home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_202 / vlt / vltstory.zoo / vltstory next >
Text File  |  1989-05-04  |  165KB  |  3,571 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                 VLT, The Story
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                                Marvin Weinstein
  16.  
  17.  
  18.                         Stanford Linear Accelerator Center
  19.                      Stanford University, Stanford, CA 94305
  20.  
  21.  (Edited by Willy Langeveld) 
  22.  (To be reedited by Marvin Weinstein) 
  23.   
  24.  Appendices by 
  25.   
  26.   Willy Langeveld 
  27.   
  28.    Department of Physics 
  29.    University of California 
  30.    Riverside, CA 92521 
  31.  
  32.  (Edited by Marvin Weinstein) 
  33.  (To be reedited by Willy Langeveld) 
  34.   
  35.  
  36.  
  37.   Once upon a time there was a project to find out how well an Amiga could be
  38. used as a color graphics terminal and TeX workstation at SLAC (Stanford Linear
  39. Accelerator Center). It immediately became clear to all concerned that before
  40. the project could really begin one would have to have a terminal emulator which
  41. could successfully talk to the IBM 3081 and all the VAX'es on the site.
  42. Moreover, it had to compete in quality with the Ann Arbor Ambassador GXL
  43. terminals which were already in use at the laboratory. Unfortunately, at the
  44. time there was no commercial program which fit the bill, so Willy Langeveld, who
  45. had already been  playing around with Tektronix emulation, started  hacking up a
  46. public domain VT100 emulator written by Dave Wecker et al., with a little help
  47. from Marvin Weinstein. The program VLT represents the culmination of these
  48. labors. We hope it will provide a baseline from which future efforts to provide
  49. terminal emulation for use within the context of an IBM and DEC mainframe
  50. environment will build.
  51.  
  52. Not much of the original code of VT100 remains; nevertheless, we owe a debt of
  53. gratitude to the authors of the original program because it kept us on the air
  54. and functioning while the changes were taking place. Without its example to
  55. follow we probably never would have gotten as far as we did. Kudos also go to
  56. Joanne Dow who allowed us to use her code for handling the serial port, Charlie
  57. Heath for the use of his file requester, Carolyn Scheppner for the palette tool
  58. and Dave Betz for his Bmodem code. Having this stuff to fall back upon made the
  59. job of cleaning up the relevant portions of the old VT100 code much easier and
  60. helped make things run faster and more smoothly. Also thanks to Jim Kent, Jim
  61. Mackraz and Tom Rokicki for various little snippets of code!
  62.  
  63.  
  64.   What It Does At SLAC: Terminal Emulation 
  65.  
  66. The original purpose of this terminal emulation program was to provide one of
  67. the crucial links in the establishment of the Amiga as a feasible, cost
  68. effective terminal + TeX Workstation at SLAC. This dictated that it had to do
  69. certain things and do them well.
  70.  
  71.     First, it had to allow one to log onto IBM and VAX mainframes over
  72. various communications links, telephone lines, the Micom Switch and the Bridge.
  73. This meant that various parity modes and Xon/Xoff protocols had to be supported
  74. and that it should be easy to switch between these modes. Thanks to the native
  75. software of the Amiga and Joanne Dow's code, VLT supports baud rates from 300
  76. to 19200, 15 parity protocols (including the 7E1 required by the IBM) and four
  77. different handshaking protocols (including Xon/Xoff).
  78.  
  79.   The terminals most in use at SLAC are Ambassador GXL's. These have 24
  80. programmable function keys and allowed the system to reprogram various
  81. attributes of the terminal in order to automatically switch between 24, 32 and
  82. 43 line mode on the IBM. Since the Amiga keyboard only has 10 function keys
  83. along the top of the keyboard alternative ways of getting the same functionality
  84. had to be explored. The solution was to provide the user with several choices:
  85.  
  86.  o  The numerical keypad on the right hand side of the Amiga keyboard
  87. functions as it does on a VT100, and so all of the IBM function keys used at
  88. SLAC can be accessed from there in exactly the same way that they would be
  89. accessed on a true VT100.
  90.  
  91.  o  The ten function keys at the top of the keyboard can be programmed by
  92. the user so as to provide 40 functions. This is accomplished by allowing
  93. programming of the keys F1---F10 themselves,  and the two-key combinations SHIFT
  94. + F1---F10 (i.e., hold down the shift key and hit any function key), ALT +
  95. F1---F10 and CTRL + F1---F10.
  96.  
  97.  o  At the bottom of the screen, a total of 30 function gadgets can be
  98. displayed. These gadgets are on-screen software objects which may be activated
  99. by moving the mouse cursor over them and clicking the left mouse button. They
  100. are programmed by default to emulate the way in which the function keys on an
  101. Ambassador work, but they can be user-programmed in a variety of ways which will
  102. be explained later. For those users who do not wish to have these function
  103. gadgets displayed at the bottom of the screen we have provided a means for
  104. removing and restoring them at will.
  105.  
  106.  o   VLT provides an additional 10 programmable function keys accessed
  107. by holding down the Amiga key to the right of the space bar and hitting any one
  108. of the numbers 1,2,...,0 at the top of the  keyboard.
  109.  
  110.   Since we are talking about color terminal support, it was important that
  111. the terminal allow the mainframe to send escape sequences in order to tell the
  112. Amiga to use different colors to display bold, underlined, italic and reverse
  113. video fields in  different colors, as would be done by an IBM 3270 terminal.
  114. VLT supports these features and the escape sequences which should be sent by
  115. the host in order to activate them are documented in Appendix I.
  116.  
  117.   VLT is designed to provide the same sort of Tektronix emulation that
  118. one has become used to on the Ambassador GXL terminal: it opens a second screen
  119. for graphics, independent of the alphanumeric screen. As in the case of the
  120. Ambassador GXL the second screen provides the functionality of a Tektronix 4014
  121. terminal, however, since we wished to provide color support, it also handles
  122. many of the escape sequences recognized by a Tektronix 4105 terminal. This means
  123. that it will handle the color commands which will be available under the SLAC
  124. facilities TopDraw and Unified Graphics. The details of the Tektronix emulation
  125. and the  escape sequences that need to be sent for which commands are given in
  126. Appendix II and III.
  127.  
  128.   The Amiga is naturally a mouse + keyboard oriented machine. Once a person
  129. gets used to this he or she often wishes to have a way to use the mouse to
  130. handle cursor positioning and interactive graphics support when dealing with the
  131. mainframe. VLT  allows the user to use the mouse for cursor positioning, etc.
  132. Those who like to do everything from the keyboard can turn this feature off.
  133.  
  134.  
  135.    What It Does At SLAC: File Transfer 
  136.    -----------------------------------
  137.  
  138. As already noted, in addition to using the Amiga as simply a high quality color
  139. graphics terminal, we also wished to be able to use it for local TeX and ASCII
  140. document preparation and TeX previewing. In order to do this we needed a good
  141. editor, a first rate TeX program and a means of getting files to and from the
  142. mainframe. The editor we have chosen for this purpose is TxEd Plus, the TeX
  143. program is Tom Rokicki's AmigaTeX and the file transfer is built into VLT .
  144. Since this writeup is meant to play the role of a VLT user's manual, we will
  145. not go further into these issues. The remainder of this section will discuss the
  146. file transfer protocols which VLT supports.
  147.  
  148. IBM mainframes, being what they are, do not in general like to talk to other
  149. than IBM hardware. Therefore, some very special protocols had to be developed in
  150. order to make it possible to transfer files from an IBM mainframe to a desktop
  151. computer such as the Amiga. The most popular protocol for carrying on such
  152. transfers with an IBM mainframe is named Kermit (yes, for the frog). Kermit is
  153. one of a number of transfer protocols which are supported on the SLAC system,
  154. another one being PC-TRANS, which is used with the Ambassador emulation (ABE)
  155. provided for IBM PC's on the IBM mainframe. Since Kermit is a much more widely
  156. used file protocol and therefore not so site specific, we chose it for inclusion
  157. in VLT. Also, it didn't hurt that this was one of the protocols provided
  158. in Wecker's original code.
  159.  
  160.       In any file transfer process of this type there are two separate
  161. programs which must be run together, one  on the mainframe and one on the local
  162. (desktop) computer. VLT provides two ways for handling the details of this
  163. process. One way is to do everything by hand using the keyboard or menu options
  164. which will be discussed in the section giving the details of the file transfer
  165. process. This of course necessitates that you know how Kermit works both on the
  166. Amiga and on the mainframe. To learn how the mainframe version works all you
  167. have to do is log onto VM and type   HELP KERMIT   Obviously, the
  168. virtue of providing a general file transfer mechanism of this type is that it
  169. allows you to handle file transfers using Kermit which are not going to SLAC's
  170. IBM 3081; the disadvantage is that the user has to carry out many repetitive
  171. steps and faces the danger of locking up the IBM since file transfer to and from
  172. the mainframe can be a somewhat fragile process.
  173.  
  174.         However, since VLT interfaces to AmigaREXX (AREXX), it is possible to
  175. write macros (also called scripts or execs) to handle the details for you.
  176. Macros for the handling of ASCII (text, not binary) file transfers to and from
  177. the mainframe are included, This is one example of the general AREXX scripting
  178. capablity built into VLT.  The file transfer process is carried out by these
  179. REXX execs which can be modified by the user to suit his own purposes if and
  180. when he or she learns a little about the AREXX language. For those who are
  181. familiar with REXX on the mainframe, AREXX is a full implementation of REXX on
  182. the Amiga,  with extra features which allow access to many of the Amiga's
  183. special capabilities. A discussion of the way in which VLT interfaces to the
  184. general Amiga multi-tasking environment and AREXX in particular will be given
  185. later, and an example will be discussed. Note, that in what follows we will
  186. often assume that you have a setup which includes AREXX and WSHell. If you do
  187. not have these programs you should since VLT is really designed to function as
  188. one component in a system of modular software using AREXX as the process
  189. manager. Both products can be ordered from
  190.   
  191.             William S. Hawes  
  192.             P.O.Box 308  
  193.             Maynard, MA 01754  
  194.             (617) 568--8695  
  195.  
  196.  
  197. Although VLT will run perfectly well without AREXX and WShell, the full
  198. scripting capabilities will not be available to you unless you are operating
  199. within the environment created by these two programs. Another product which you
  200. should have is FastFonts from Microsmiths. It can be purchased as part of the
  201. program TxEd-Plus, an AREXX integrated editor. This product is available from
  202.   
  203.            Microsmiths, Inc.  
  204.            P.O. Box 561  
  205.            Cambridge, MA 02140  
  206.            (617) 354--1224  
  207.  
  208. Fastfonts allows you to replace the system font with one which looks a lot
  209. better and also speeds up the writing of text to the screen by a significant
  210. amount, thus making for much smoother terminal operation.
  211.  
  212. Another protocol which has come into wide use is the Xmodem protocol (and its
  213. derivatives such as YMODEM and ZMODEM). As with Kermit it requires that a pair
  214. of programs be run together, one on the mainframe and one on the desktop
  215. computer. Although this protocol cannot be used with IBM mainframes it can be
  216. used with VAX'es on site.  An XMODEM program that runs on the VAX (VAXXMODEM)
  217. can be obtained from Willy Langeveld (WGLP09 at SLACVM). As with Kermit two
  218. modes of operation are possible. First, file transfer can be carried out
  219. entirely by hand by starting the mainframe program and then handling the Amiga's
  220. part of the deal from the menu options. On the other hand, it is a simple chore
  221. to rewrite the AREXX scripts which handle Kermit file transfers to handle XMODEM
  222. transfers to and from the VAX.
  223.  
  224.          Last but not least there is the simplest method
  225. of all for accomplishing a file transfer to the desktop, ASCII capture. In this
  226. mode you simply set the program to save everything which comes to the terminal
  227. screen to a file. On an IBM, this works only if you set the IBM into scrolling
  228. mode by logging on in line mode (VMLINE or PACE) and then typing
  229.  
  230.    TYPE MYFILE FT FM 
  231.  
  232. This is the fastest method for downloading a file to the Amiga, but it does no
  233. error checking, so it is not the safest mode for long files. In addition to
  234. ASCII capture we have ASCII send: this lets the Amiga type a file to the the
  235. mainframe. Unfortunately, this mode of file transfer does not always work well
  236. since most mainframes do not handle stuff coming at it this fast.  However, this
  237. method works if one is logged onto many bulletin boards or with online services
  238. such as BIX and CompuServe.
  239.  
  240.  
  241.          Installation 
  242.  
  243.   If you got VLT on a 3.25 in disk labelled VLTDISK: then you should find,
  244. in addition to the program VLT itself, several files and directories which you
  245. have to install on your boot disk in order to make it possible for you to use
  246. all the features the program has. If on the other hand you have obtained VLT
  247. on a disk labelled SLACDISK: then you already have a bootable disk containing
  248. the necessary files and all you should do is diskcopy it to another disk and use
  249. the copy as your boot disk. In that case, unless you want to create your own
  250. custom boot disk, you can skip this section entirely. (I will assume in this
  251. write-up that the reader has at least a passing familiarity with the way in
  252. which the Amiga's filing system organizes files into directories,
  253. subdirectories, etc. Those people who use the VAX'es will be familiar with this
  254. concept, however IBM mainframe users will find that it takes a little getting
  255. used to. I suggest you read your manual or the writeup    Getting To Know Your
  256. Amiga in order to gain a passing familiarity with the file system.)
  257.  
  258.    What's On the Disk? 
  259.  
  260. The disk distributed to you has two files in the root directory (these are the
  261. files you see listed when you type the command
  262.  
  263.    DIR 
  264.  
  265. in any CLI (Amigaese for Command Line Interface, i.e. a window which behaves
  266. like a terminal where you are prompted for commands). These files are called VLT
  267. and VLT.INFO . The first file is the terminal program itself and the second is
  268. the Workbench icon which allows you to run the program by opening up a window on
  269. the Workbench and clicking on the ICON. Even if you are an afficionado of the
  270. CLI (for example, if you come from the IBM-PC world) you ought to take a look at
  271. the icon. It is BIG and impressive. In particular, look at the little lights on
  272. the modem (Willy is really proud of that touch). Both of these files should be
  273. copied to the root directory of your boot disk. To copy these over (assuming you
  274. have two disk drives) type
  275.  
  276.    COPY VLTDISK:VLT TO DF0: 
  277.  
  278. (note, I have implicitly assumed that your boot disk is in drive DF0: and that
  279. the distribution disk is in the drive called  DF1:). Then type
  280.  
  281.    COPY VLTDISK:VLT.INFO TO DF0: 
  282.  
  283. At this point you have transferred both the terminal program and its icon to the
  284. root directory of your boot disk. You might think that you are done now, however
  285. that is not the case. In order for VLT to work at all you need to copy several
  286. other files to various directories on your boot disk. Some of the files listed
  287. below are not required, but allow you to use VLT's full potential.
  288. The directories which contain files which you should transfer are
  289.  
  290.       VLTDISK:C
  291.  
  292.       VLTDISK:LIBS
  293.  
  294.       VLTDISK:S
  295.  
  296.       VLTDISK:REXX
  297.  
  298.       VLTDISK:FONTS
  299.  
  300.       VLTDISK:DOCS
  301.  
  302. In the sections to follow we will list the contents of each directory and
  303. subdirectory on VLTDISK: and explain what to do with them and why.
  304.  
  305. If you have obtained VLT by downloading the archive VLTnpmmm.arc, some of the
  306. files mentioned may be missing. In that case, read all the README files in the
  307. archive and execute all the EXECUTEME's (we assume such users are experienced
  308. enough to know what to do).
  309.  
  310.  
  311.   VLTDISK:LIBS
  312.  
  313. This directory contains five files:
  314.  
  315.  arp.library
  316.  rexxarplib.library
  317.  rexxmathlib.library
  318.  rexxmathsbii.library
  319.  screenshare.library
  320.  
  321. The first file is the library of routines belonging to the AmigaDOS Replacement
  322. Project (ARP). This is a project undertaken by various Amiga developers to
  323. replace the Amiga's native DOS commands with a set of commands which are smaller
  324. (i.e. take up less room on your boot disk) and which provide a more consistent
  325. user interface. This file must be copied to the directory  DF0:libs  on your
  326. boot disk. To do this type
  327.  
  328.    COPY VLTDISK:ARP.LIBRARY TO DF0:LIBS 
  329.  
  330. The next file, rexxarplib.library, is a library (written by Willy) which allows
  331. you to access some ARP functions (among which Charlie Heath's file requester)
  332. and several other requesters and message windows from within AREXX script files.
  333. This is extremely useful and allows for a uniform interface among different
  334. pieces of AREXX capable software. In particular it means that macros written for
  335. VLT , AmigaTeX and TxEd Plus have access to the same Amiga gadgets for
  336. posting messages and obtaining input; hence, once you are used to them in one
  337. application you know how to use them whenever you run across them.
  338.  
  339. The file rexxmathlib.library is another AREXX library (Willy again) which makes
  340. all the special math functions which are in the IEEE Amiga math library callable
  341. from AREXX. This makes the Amiga into a programmable calculator par excellence.
  342. The documentation which explains the functions callable from
  343. rexxarplib.library and rexxmathlib.library are all on the disk in the directory
  344. VLTDISK:docs. A special version of the library is called rexxmathsbii.library.
  345. This library can be used instead of rexxmathlib.library if you have a StarBoard
  346. II (by MicroBotics) with a Multi-Function Module and a 68881 math coprocessor.
  347.  
  348. Finally, the file screenshare.library must be copied. It allows the requesters
  349. of rexxarplib.library to appear on VLT's screen even if it is a CUSTOM screen
  350. (if you don't know what this means, don't let it bother you).
  351.  
  352.    VLTDISK:C
  353.  
  354. This directory contains the ARP1.1 replacements for the functions of the same
  355. name found in the directory Workbench:c on your boot disk. If you wish to
  356. install these commands in place of the ones provided with your Amiga, and this
  357. is highly recommended, you simply type
  358.  
  359.    COPY VLTDISK:C TO DF0:C 
  360.  
  361. Notice, that all these commands make use of the file arp.library which you
  362. were instructed to copy in the previous paragraph. Now you understand that it
  363. is important to copy arp.library first!
  364.  
  365.   VLTDISK:S
  366.  
  367. You will find three files in this directory:
  368.  
  369.  VTPrefs.dat
  370.  TekPrefs.dat
  371.  ovlt.init
  372.  
  373. Copy these files to the directory DF0:S by typing
  374.  
  375.    COPY VLTDISK:S TO DF0:S 
  376.  
  377. The first two files are configuration files which contain information which
  378. defines the values for all the parameters which can be set from the VLT menus
  379. and from scripts. When you first run the program VLT by either clicking on its
  380. icon on the Workbench, or by typing
  381.  
  382.    RUN DF0:VLT 
  383.  
  384. (assuming that you have not copied VLT to some other location like RAM: or
  385. VD0:), it will look in the directory assigned to S: (usually DF0:S) for the
  386. files VTPrefs.dat and TekPrefs.dat . If they do not exist VLT will start up
  387. with a set of built-in defaults which will probably not correspond to the
  388. configuration which you wish to use. We will come back to the way in which you
  389. can modify these files in the next chapter when we discuss VLT 's user
  390. interface.
  391.  
  392. In addition to the parameter files VTPrefs.dat and TekPrefs.dat, VLT will look
  393. for a file called vlt.init . It is a file that may contain any valid VLT
  394. primitive script command. As such, it can serve a similar role to VTPrefs.dat
  395. and TekPrefs.dat in that it allows the user to define the default values
  396. established for the terminal configuration when you first run it. It differs in
  397. that it is a text file that can be edited. If you wish VLT to use this file
  398. every time you turn on simply rename ovlt.init to vlt.init by typing
  399.  
  400.    RENAME DF0:S/OVLT.INIT DF0:S/VLT.INIT 
  401.  
  402. Once you have done this, commands in this file will be executed and values given
  403. in this file will override the ones specified in VTPrefs.dat and TekPrefs.dat.
  404.  
  405.    Why have files of this sort? The reason is really quite simple. Often a
  406. user has to log on to more than one kind of mainframe (for example, the IBM and
  407. a VAX) and he wishes to have a different configuration on each machine. In that
  408. case he can tell VLT to use different configurations for different machines by
  409. the way he invokes the program.
  410.  
  411.     NOTE:  this option is only available if you start the program
  412. from a CLI and not if you click on the Workbench icon. The way in which you
  413. invoke different startup configurations is explained in the next chapter.
  414.  
  415.   VLTDISK:REXX
  416.  
  417. This directory contains examples of AREXX macros which can be automatically
  418. invoked by choosing the first option in the macros menu when the program is
  419. running. If you have AREXX as part of your setup (and once again we urge that
  420. you do) then you should type the following two commands
  421.  
  422.    MAKEDIR DF0:REXX 
  423.    COPY VLTDISK:REXX TO DF0:REXX 
  424.  
  425. The discussion of these execs (or macros, or scripts) and what they do
  426. will appear in the next chapter.
  427.  
  428.     VLTDISK:FONTS
  429.  
  430. This directory contains several sets of fonts. The font called vltgraph.font and
  431. its accompanying directory vltgraph with the files 8 and 11 is necessary.
  432. It also contains a font which is a modification of Charlie Heath's
  433. siesta font and which we find easy to read. If you don't like it you can always
  434. fire up the font editor on your Extras Disk and change it, or make your own
  435. font. This font will, however, only be used by VLT if you have FastFonts.
  436. To copy this directory, type
  437.  
  438.    COPY VLTDISK:FONTS TO DF0:FONTS ALL 
  439.  
  440. Note, you cannot leave out the word ALL since this tells DOS to create
  441. the subdirectories DF0:FONTS/MYSIESTA and DF0:FONTS/VLTGRAPH and copy the
  442. contents of 
  443.  
  444.   VLTDISK:FONTS/MYSIESTA and VLTDISK:FONTS/VLTGRAPH to it.
  445.  
  446.   VLTDISK:DOCS  
  447.  
  448. This directory contains files which you don't have to copy to your boot disk,
  449. but which may be consulted for information about the way in which you use the
  450. ARP1.1, rexxarplib and rexxmathlib commands. If you own TxEd or TxEd Plus use
  451. them to examine the files. If you don't own a text editor you can see what files
  452. are in this directory by typing
  453.  
  454.    DIR VLTDISK:DOCS OPT A 
  455.  
  456. and to see the contents of a particular document named foo.doc type
  457.  
  458.    TYPE VLTDISK:DOCS/FOO.DOC 
  459.  
  460. and the contents of the documents will be typed to the screen. To stop the file
  461. from scrolling off the screen the easiest thing is to hit the space bar (or any
  462. other key). To start it up again hit backspace.
  463.  
  464.  
  465.  
  466.          The User Interface 
  467.  
  468.    Starting Up 
  469.  
  470.   As was mentioned in the previous chapter, there are two ways to start VLT .
  471. The simplest way is to click on the Workbench disk icon found on the right hand
  472. side of the Workbench screen. This will cause a window to open and in this
  473. window there will be found an icon whose purpose, thanks to Willy, you will not
  474. be able to help identifying. Move your mouse cursor over this icon and quickly
  475. click the left mouse button twice (this is called    double-clicking ). At
  476. this point a particularly silly looking cloud will appear to tell you that the
  477. program is loading, and in a few moments the appearance of your screen will
  478. change dramatically (everything will disappear) because you are now under the
  479. control of the terminal program.
  480.  
  481. The second way in which you can reach the same point is from the CLI environment
  482. and it is done by typing
  483.  
  484.    RUN DF0:VLT 
  485.  
  486. (assuming that you have the program in the root directory of your boot disk).
  487. This method will be preferred by people used to working on the mainframe and who
  488. are unsure of their mouse acuity. Actually, it is the more flexible method
  489. because you can provide the command with several parameters which affect the way
  490. in which it is invoked. The full syntax of the command is
  491.  
  492.    RUN VLT [+I startup.file] [script1] [script2] ..... 
  493.  
  494. or
  495.  
  496.    RUN VLT [-] [script1] [script2] ..... 
  497.  
  498. Clearly this arcane form of the command requires some explanation.
  499.  
  500. As we noted in the previous section VLT has the capability of using plain text
  501. configuration files in order to define the baud rate, screen colors, etc. which
  502. it will use after the program has loaded. Such configuration files, of which
  503. ovlt.init is an example, can also contain most of the basic scripting commands
  504. of VLT. The way in which one writes script files and the commands which VLT
  505. understands will be fully discussed in the section titled MACROS, at this
  506. juncture the only thing you need to know is that such scripts exist and you can
  507. tell VLT to execute any number of them in a specified order at startup.
  508. If you only type
  509.  
  510.    RUN VLT 
  511.  
  512. what happens is that VLT first looks at the file VTPrefs.dat, which contains
  513. default values (which you can change) of all its internal paramters. Then it
  514. looks for a file called vlt.init, either in the current directory, or in the
  515. directory assigned to S:. If you type the command with the  +I  option,
  516. then you are telling VLT that it should use a file with another name instead
  517. of vlt.init. In the above example that would be startup.file . (Notice, that the
  518. [ ] indicate that the parameter is optional). If you type the command with the
  519.  -I  you indicate the program should be run without looking for any .init
  520. file.  Any other file names specified on the command line are the names of
  521. script files, that the program should run after the startup file has completed
  522. and when VLT is fully up and running.
  523.  
  524. The distinction between ordinary script files and startup files exists because
  525. there are certain VLT commands which can only be executed at startup, and
  526. conversely, other commands can only be executed when VLT is  running.
  527.  
  528. Hence, you might have two configuration files called S:IBM.INIT and S:VAX.INIT
  529. and perhaps two scripts called S:IBMLOGON.SCP and VAXLOGON.SCP. Then, if you
  530. type
  531.  
  532.    RUN VLT +I  S:IBM.INIT S:IBMLOGON.SCP 
  533.  
  534. it will setup according to the defaults specified in the file S:IBM.INIT and
  535. then execute the logon sequence specified in the file S:IBMLOGON.SCP. (Recall:
  536. S: is the logical name usually assigned to the directory DF0:S .) If, on the
  537. other hand you type
  538.  
  539.    RUN VLT +I S:VAX.INIT S:VAXLOGON.SCP 
  540.  
  541. it will set up the defaults specified in S:VAX.INIT and run the logon procedure
  542. specified in S:VAXLOGON.SCP. If you are the proud owner of WSHell then you can
  543. add the commands
  544.  
  545.    ALIAS IBMVLT = VLT +I S:IBM.INIT S:IBMLOGON.SCP 
  546.  
  547.    ALIAS VAXVLT = VLT +I S:VAX.INIT S:VAXLOGON.SCP 
  548.  
  549. to your startup sequence and save yourself a lot of typing.
  550.  
  551. In either event, no matter which procedure you choose to get started, once your
  552. screen goes blank you have entered the domain of VLT and the time has come to
  553. become acquainted with what we refer to as its user interface.
  554.  
  555.  
  556.    Menus, Menus, Menus 
  557.  
  558. Assuming that you could not wait and have followed our previous instructions and
  559. now find yourself staring at a blank screen (this emulates what an ordinary
  560. terminal looks like when you turn it on) you now are wondering what you should
  561. do. If you have hooked up your modem or Micom box/cable to the Amiga's serial
  562. port as per the instructions in your manual, all you really have to do is hit
  563. return once or twice and things might go very smoothly and you will be ready to
  564. log on to your favorite mainframe. Of course Murphy's Law being what it is
  565. things are probably not going to go like this and you will have to reset some of
  566. VLT 's defaults so that it will work with your modem and mainframe combination.
  567. The question we will address in this section is how you go about doing this and
  568. how, when you are finished doing this, how you save the results of your efforts.
  569.  
  570. If you are an Amiga novice the first step is to get acquainted with Amiga menus
  571. in general and VLT 's in particular. To display a menu put your hand on your
  572. mouse, hold down the    right   mouse button. At the top of the screen the
  573. following words will appear:  
  574.  
  575.   VLT   Comm   Transfer  Macros  Screen  Operation Graphics
  576.  
  577. These are the names of the seven drop down menus which belong to VLT 's
  578. alphanumeric screen (i.e. the screen on which text is displayed). Moving the
  579. cursor over any one of these names (still holding the right mouse button down)
  580. causes the menu associated with that name to drop down. Each of these menus has
  581. several items (or options) displayed on it and some options even have
  582. sub-options (or sub-items) associated with them. Sub-items are revealed only
  583. when you slide the mouse cursor down along the menu until it is pointing to the
  584. correct item.
  585.  
  586. The various menu options allow you to change some of the default parameters
  587. VLT opened with, start a file capture or transfer, launch an AREXX or VLT
  588. script, switch to another window or screen, etc. To select a menu option you
  589. simply slide the mouse cursor over the option until the choice you wish is
  590. highlighted and then holding the mouse steady you release the right mouse
  591. button. For keyboard oriented individuals, we have also provided keyboard
  592. shortcuts for selecting most of these options. To select an option from the
  593. keyboard, hold down the Right-Amiga key (i.e., the key to the right of the space
  594. bar with the letter A on it) and type the letter you found shown to the right of
  595. the item text in the menu. Thus, to start a capture you can select the Capture
  596. Session option in the VLT menu using the mouse, or alternatively hold down the
  597. Right-Amiga key and hit the letter O.
  598.  
  599. We will devote the remainder of this section to listing each of the menu options
  600. and explaining what they do. Since there are separate menus associated with the
  601. text and graphics screens we will discuss each case separately.
  602.  
  603.  
  604.  
  605.   Menus Which Belong to the Text Screen  
  606.  
  607.  
  608.      VLT
  609.        Capture Session
  610.        End Capture
  611.        Save Screen
  612.        Save Configuration
  613.        Version
  614.        Exit
  615.  
  616.    The VLT Menu
  617.  
  618.   Capture Session 
  619.  
  620. This option can be selected from the menu as shown, or by using the alternate
  621. keyboard command A-O (hold down the right amiga key and type O). All commands
  622. that have keyboard alternatives are indicated in the menu in this way. This
  623. option allows you to capture anything which is coming to the screen to a file.
  624. If you select this option Charlie Heath's file requester will appear. It will
  625. look something like the picture below. Since this is a file requester you will
  626. not be surprised to know that it is requesting that you give it the name of the
  627. file into which the program is to save the captured text. This requester will
  628. appear again and again so it is worth spending a few minutes describing the way
  629. in which it is used. There is a special paragraph at the end of this section
  630. which explains the file requester in great detail.
  631.  
  632. For now, suffice it to say that the requester is actually a window  (just like
  633. any of the windows which open on the Workbench) which is endowed with several
  634. gadgets. Two obvious gadgets are the rectangular boxes at the top and bottom of
  635. the window. The first one is labelled  drawer  and the second  file .
  636. These are string gadgets in which you can type names of files and directories.
  637.  
  638. Every Amiga filename consists of two parts: the path which specifies the
  639. disk:directory/subdir/subdir/.../  that a file resides in and the file's
  640. name. Hence we have files like 
  641.  
  642.   DF0:DEVS/KEYMAPS/USA1 
  643.  
  644. or  
  645.  
  646.   DF0:FONTS/MYSIESTA/8 .
  647.  
  648. In the first case the path is DF0:DEVS/KEYMAPS and the filename is USA1. In the
  649. second case the path is DF0:FONTS/MYSIESTA and the filename is 8. Directories
  650. (paths) are really the same as the `drawers' you see when you look at the
  651. Workbench screen when some of the disk icons are open. Charlie Heath therefore
  652. chose to label the string gadget wherein you are to type the path designation
  653. drawer. The second string gadget, into which the filename is to be typed
  654. is labelled file  .
  655.  
  656. If you wish to do everything by hand simply select the top string gadget by
  657. clicking upon it with the mouse (use the left mouse button) and then type the
  658. name of the directory where you want to store the captured file. For capture
  659. files it usually is wise to use RAM: or VD0: (which is the name of a recoverable
  660. ram disk). Suppose you type VD0:. When you're done, either hit return, or use
  661. the mouse and click in the file gadget. Either action will activate the second
  662. gadget. Here, you type the filename you wish VLT to use. Type, e.g., JUNK. At
  663. this point, if you are happy, all you have to do is click on the gadget labelled
  664. OKAY and the requester will disappear and from that moment on VLT will save
  665. everything it gets from the mainframe into a file named VD0:JUNK. If you wish to
  666. give up on the whole thing click on the CANCEL gadget.
  667.  
  668. Note that we recommend capturing to RAM: (or VD0:) since it is faster than
  669. capturing to a floppy disk. Also, should for some reason a system crash occur
  670. while VLT is writing to a disk, there is a (small) chance that you will
  671. wind up with an unreadable floppy.
  672.  
  673. Selecting the Capture Session  option from the VLT menu a second time will
  674. suspend file capture. If you do this a little message box will appear on your
  675. screen saying that this has happened. This message box will go away as soon as
  676. you hit any key or click on your mouse. When capture is suspended nothing that
  677. comes to the screen goes to the capture file. Reselecting  Capture Session 
  678. toggles capture on again and everything coming to the screen is again being
  679. saved into the previously defined file. You can toggle capture on and off can
  680. go on as many times as you wish.
  681.  
  682.   End Capture 
  683.  
  684. To shut down file capture completely and close the capture file all you
  685. have to do is select this option.
  686.  
  687. This completes the discussion of capture to a file, however the astute user will
  688. have immediately noticed that there is a lot of other stuff going on in
  689. Charlie's requester.
  690.  
  691. An Aside About The File requester
  692.  
  693.  
  694. The first thing we should discuss is that if you use the mouse and click on the
  695. drawer gadget you then can type the directory  where a file you want to create
  696. should be stored or where a file you wish to  access resides. If you now hit the
  697. return key the names of all the files already stored in that directory will
  698. appear in the region between the drawer gadget and the file gadget. If there are
  699. a sizeable number of files in this directory then it will take a few moments for
  700. the names of all files to be loaded into memory. If there are many files not all
  701. names will be visible at once; however, you can view them all by scrolling
  702. through the list of names in memory, that is what the    slider   (also
  703. called proportional gadget) on the right hand side of the requester is for. This
  704. is another type of screen gadget which works like a knob sliding in a track. To
  705. use it place your mouse over the knob, hold down the left mouse button (this
  706. grabs the knob) and slide your mouse up or down. As you do this the list of file
  707. names in the directory will scroll past. Another thing that will happen when you
  708. first click on the knob is that the list will be sorted alphabetically. This is
  709. useful, for example,  when you wish to transfer a file to the main frame, or
  710. when you wish to specify the name of an AREXX macro or VLT script file you wish
  711. to have executed. In such an event, instead of typing the name of the desired
  712. file into the file gadget, you can take a shortcut; namely, move your mouse
  713. cursor over the name you wish to appear in the file gadget and click your left
  714. mouse button once. Automagically, the name will appear in the file box below.
  715. Now, in order to indicate that you have made your choice all you have to do is
  716. click on the OK gadget, or simply hit the RETURN key, whichever is easiest to do
  717. at the moment. Actually, there is yet another way to combine the steps of
  718. choosing the name you wish to put in the string gadget and then signalling that
  719. you are done; simply double click on the name of the file. (   Double click  
  720. means click the left mouse button quickly twice in a row).
  721.  
  722. Okay, now that we know about scrolling through file names in a directory, and
  723. the shortcuts for getting the name into the file string, you naturally want to
  724. know if there is a shortcut for getting the
  725. directory/subdir/subdir/.../  name into the drawer gadget.    Yes there
  726. is.   In fact, it works entirely the same way. When you click on a name that
  727. starts with the highlighted letters (dir) , this directory specification
  728. will appear in the drawer gadget. However, sometimes the directory you want
  729. isn't listed because it is on another disk, perhaps. The trick is to use the
  730. right mouse button. If you position the mouse cursor over the body of the
  731. requester and click on the right mouse button the names of all the devices on
  732. which files are stored will appear. Devices are things whose names finish in a
  733. : , that is names like DF0:, DF1:, RAM:, VD0:, etc. (NOTE: The Amiga allows
  734. you to pull a trick and assign whole path names to a `logical' device by typing,
  735. for example,
  736.  
  737.    ASSIGN REXX: DF0:REXX 
  738.  
  739. inside a CLI or by putting it in your startup-sequence. If you have done this
  740. then Charlie Heath's requester will be smart enough to display this for you when
  741. you click the right mouse button and you will be saved plumbing the depths of
  742. various directories to find a specific file.) If you click on one of these names
  743. (using the left mouse button) that name will appear in the drawer gadget, and
  744. then the names of the files and directories stored here will appear in the
  745. window between the drawer and file gadgets. Files will simply be represented by
  746. their names. As mentioned, directories will be prefaced by the symbol  
  747. (dir)  and this will appear in a different color than the file names. If you
  748. want one of the files whose name is displayed simply click upon it and it will
  749. appear in the file gadget. If you want a file in one of the directories, then
  750. click on the name of the directory and it will appear in the drawer gadget. Of
  751. course, when the directory name appears in the drawer gadget then the names of
  752. the files in that directory will replace the names of the files that were
  753. displayed previously. The set of files that are stored in the top directory
  754. level are said to be in the    root   directory, other  files are said to be
  755. inside subdirectories. To get back the list of files that lay outside this
  756. directory click on the parent gadget. First the directory name will revert to
  757. the name of the parent directory and the list of names of files in the parent
  758. directory will be redisplayed.
  759.  
  760. Very often when you look inside a directory you will find that it contains other
  761. directories, which are referred to as subdirectories (kind of like a Russian
  762. doll). You can keep peeling away at these subdirectories, like peeling the
  763. layers of an onion, until you find the file you are looking for. Remember, if
  764. you go into a subdirectory and realize you have gone a layer to deep, simply
  765. click on the parent gadget and you will be returned to the previous directory.
  766.  
  767. The last thing to discuss is the CANCEL gadget, what could that be for? Right,
  768. if you wish to abort the whole process you just started and have nothing happen
  769. you click on the cancel gadget and the requester disappears into the night
  770. leaving no trace of its passage. This finishes our aside on Charlie Heath's
  771. requester.  
  772.  
  773.   Save Screen Contents 
  774.  
  775. This command doesn't do anything at present, except to tell you it isn't
  776. currently implemented.
  777.  
  778.   Save Configuration 
  779.  
  780. This command is very important in that it allows you to save the settings you
  781. have made like baud rate, number of lines, macro key settings, colors, etc. to
  782. the file S:VTPrefs.dat . All you have to do is configure things the way you want
  783. and then select this option. If you already had a VTPrefs.dat file, the current
  784. settings will replace the ones in that file. Note, that VLT looks for this
  785. file in two places: first it will look in the directory where you were when you
  786. started it up, and if the file is not there, VLT will look in the S:
  787. directory. If you didn't have a VTPrefs.dat yet, VLT will create it and store
  788. it in the current directory. (NOTE: S: is, at boot time, ASSIGN'ed to DF0:S. If,
  789. however, you change this assignment VLT will  look for VTPrefs.dat in a
  790. different directory).
  791.  
  792.   Version 
  793.  
  794. This does nothing but bring up a message telling you what version of the program
  795. you are using. You should include this in any correspondence about bugs since it
  796. will tell us how old your version of the program is.
  797.  
  798.   Exit 
  799.  
  800. This command does exactly what it says: it shuts down the terminal program.   
  801. It is best to log off from your mainframe before selecting this option. 
  802.  
  803.  
  804. This ends the list of commands available from the first menu on the text screen.
  805. Next let us take a look at the commands available from the second menu on the
  806. text screen.
  807.  
  808.  
  809.  
  810.       Comm
  811.          Baud
  812.          Parity
  813.          Protocol
  814.          Send Break
  815.          Hang Up
  816.          Echo
  817.  
  818.    The Comm Menu
  819.  
  820.   Baud 
  821.  
  822. If you select the Comm  Menu you will see a second menu box appear to the
  823. right of the selected menu item; this is our first example of a submenu. When a
  824. submenu appears this means that there are several options associated with the
  825. main menu choice and you have to pick one (or more) of them. To do this keep
  826. holding the right mouse button down and slide the cursor to the right (not up or
  827. down or you will change menu item and the submenu will disappear, or a submenu
  828. associated with another item will appear in its place) until the highlighted
  829. area appears in the submenu. When this happens move around in the submenu in the
  830. same way as you would in a main menu and select the item you want by positioning
  831. the cursor over it and releasing the right mouse button. If your mouse acuity is
  832. not yet up to snuff you might find this operation a little tricky at first, but
  833. practice will soon make perfect. In the case of the    Baud  item the submenu
  834. will show the choices 300, 1200, 2400, 4800, 9600 and 19200. These are the baud
  835. rates which VLT supports. Most SLAC users will have either 1200 or 2400 baud
  836. modems at home and so for remote use you should probably select one of these two
  837. choices. For use at SLAC through the Micom switch or the Bridge, the correct
  838. choice is 9600 baud. Eventually, 19200 will be supported at SLAC and then this
  839. becomes a possible choice. For now, if you make this choice and then hit the
  840. space bar be warned that the terminal program will hang up and you will have to
  841. reboot. This is not a bug in VLT, it appears to be a bug in the serial device
  842. which is a program which comes with the machine. We are hopeful that it will
  843. soon be fixed.
  844.  
  845.   Parity  
  846.  
  847.    Parity is an outmoded technique for error detection which most
  848. non-IBM computers pretty much ignore unless the user insists upon it.
  849. Unfortunately IBM mainframes still insist on getting a specific parity and if
  850. this is not set correctly you will not be able to log on to the main frame.
  851. (Actually, at SLAC it is not the mainframe, but rather the Series 1 which we use
  852. to allow the mainframe to communicate with non-IBM hardware.  This is a fine
  853. point, however, and knowing it will not change the fact that you can't log on.)
  854. If you select the    Parity  item in the    Comm  menu you will be presented
  855. with a submenu which will allow you to choose all of the parity setting which
  856. the Amiga supports in hardware. In addition to the (to some) familiar even and
  857. odd parity settings (with one or two stop bits) there are the less familiar mark
  858. and space parities. For SLAC users you really only need to know two settings. To
  859. log onto the IBM mainframe    always   select    7E1  . To log onto Tymnet
  860. and bulletin boards with modems you will often have to use    8N1 .
  861.  
  862.   Protocol  
  863.  
  864.    This item refers to the type of handshaking that the
  865. computer does with terminals in order to guarantee that data is not sent to or
  866. from the computer too fast for either the terminal or mainframe to keep up. Both
  867. the mainframe and the terminal have buffers which store the characters coming
  868. from their correspondent to handle temporary overloads; however, if as in the
  869. case of graphics, a huge amount of information is coming down the wire, there
  870. has to be a way for one device to tell the other to shut up until he has
  871. finished handling what it already has gotten. The Amiga provides several choices
  872. of commonly used protocols, however at SLAC we only use one called xON/xOFF.
  873.  
  874.   Break   
  875.  
  876.   Since there is no break key on the Amiga keyboard we have it
  877. included as a menu option. This command has the alternative keyboard sequence
  878. R-A B  (i.e. hold down the Amiga key to the right of the space bar and type
  879. B). This key is necessary on Tymnet and in line mode (e.g. VMLINE or PACE) but
  880. has no use in full screen mode on the IBM.
  881.  
  882.   Hang Up   
  883.  
  884.    Sometimes you want to drop your connection from the serial
  885. port (or Modem, Micom Switch, Bridge Box, etc) without leaving the terminal
  886. program. This menu choice does that by simply shutting down the serial port for
  887. a short time. Its keyboard alternative is ra H .
  888.  
  889.   Echo   
  890.  
  891.    Terminals tend to operate in one of two possible modes depending
  892. upon what the mainframe is doing. Either you type a character at the keyboard
  893. and the terminal puts it up on the screen (`echos' it) and sends it to the
  894. mainframe simultaneously, or the terminal sends the character to the mainframe
  895. and the mainframe sends back a signal telling the terminal what to put up on the
  896. screen. The first alternative is called    local echo   the second   
  897. remote echo . For logging on to SLAC the correct prescription is to select this
  898. item to be    Off  in the submenu. You will immediately recognize that the
  899. wrong choice has been made if you see that everything you type appears doubled
  900. on the screen. As you will see by examining the submenu there are alternative
  901. keyboard commands for turning local echo on and off.
  902.  
  903. This ends our discussion of the menu items which have to be set in order to
  904. establish a connection to the mainframe. The next menu contains the selections
  905. which establish the protocols you will use to send files to, and receive files
  906. from, the mainframe.
  907.  
  908.  
  909.     Comm
  910.       Send File
  911.       Receive File
  912.       Protocol
  913.       Kermit Options
  914.       XMODEM Options
  915.       Translate Options
  916.  
  917.    The Transfer Menu
  918.  
  919.   Send File 
  920.  
  921. Since VLT supports three different kinds of file transfer we have chosen to
  922. define general send and receive commands which do different things depending
  923. upon other software switches which have been set. Thus this menu item is the one
  924. you choose to initiate a file transfer from the Amiga to the mainframe. What
  925. will happen after you select this menu option depends upon the choices which are
  926. checked in items three through six of this menu. In any event, after you have
  927. selected this item Charlie Heath's file requester will appear and you can use it
  928. to find the file which you wish to send. Once the path and filename are in their
  929. appropriate string gadgets simple click on OK and the file transfer will start.
  930. While file transfer is going on a message box will appear and it will keep you
  931. apprised of how the transfer is proceding.
  932.  
  933. In general in order to send a file to or from the mainframe a program has to be
  934. run at    both   ends. These menu options only control what is happening at
  935. the Amiga end of the process, you have to learn how to run Kermit or XMODEM at
  936. the mainframe end by reading the documentation available there. In the next
  937. section where we discuss the    Macros  menu we will talk about IBM specific
  938. AREXX execs which handle the transfer at both ends for SLAC users.
  939.  
  940. For those SLAC users who wish to do something special, or who don't have AREXX
  941. up and running, the simplest form of file transfer from the Amiga to the
  942. mainframe is done as follows:
  943.  
  944.   First, type
  945.  
  946.    KERMIT RECEIVE FN FT FM 
  947.  
  948. and wait for the kermit prompt which says that it is ready for file transfer.
  949. Most of the time the screen will be cleared first. Sometimes if you are logged
  950. on in full screen mode something will happen (like a message coming to you from
  951. somewhere) to force the terminal into holding mode. You will recognize this by
  952. the fact that HOLDING... will appear at the bottom right hand corner of the
  953. screen. To get rid of this problem hit either the ENTER key or the CLR gadget on
  954. the screen (presuming the PFkey gadgets are visible).
  955.  
  956.    Next, when everything is set up then select the    Send File  option
  957. from the    Comm  menu.
  958.  
  959.       NOTE  in order to abort a file transfer which has hung up (i.e. you
  960. see nothing happening in the message window) hit the ESC key. In the case of
  961. Kermit an abort signal is sent each time you hit the escape key and it takes six
  962. such signals to abort a transaction. After you have aborted a transaction you
  963. should hit return a few times to make sure you have left the mainframe Kermit
  964. program, or at least, that you have gotten its attention.
  965.  
  966.   Receive File 
  967.  
  968. This performs the file transfer in the opposite direction, i.e. from the
  969. mainframe to the Amiga. Once again this option controls what the Amiga does, not
  970. what is going on on the mainframe. As before, for people who have AREXX running
  971. the    Macros  menu provides an option for selecting an AREXX exec which will
  972. handle file transfer to the Amiga from the FILELIST environment on the IBM.
  973.  
  974. If you do not have AREXX or wish to handle things by yourself, all the IBM user
  975. has to do is type
  976.  
  977.    KERMIT SEND FN FT FM 
  978.  
  979. and then when the screen clears and the message to procede is typed simply
  980. select the receive file option. This of course presupposes that the remaining
  981. menu options have been set up so that this mode of Kermit file transfer is
  982. chosen as your default. Again, to abort a transfer hit the ESC key six times in
  983. a row (not too fast).
  984.  
  985.   Protocol 
  986.  
  987. This is the menu item which allows you to choose the basic protocol which is to
  988. be used by the    Send File  and    Receive File  commands. When you select
  989. this menu you will be presented with a submenu which has three options
  990. displayed: ASCII transfer, Kermit and XMODEM. Each option can be set by the
  991. indicated alternate keyboard commands shown next to the subitem names.
  992.  
  993.    ASCII transfer  is the simplest and fastest option, however it does no
  994. error checking and so it is not the best way to handle long documents.
  995. Nevertheless, if you wish to use it for file transfer from the IBM, go back to
  996. the VLT menu description and read about Capture Session: the Receive File
  997. command will tell you to use exactly that, if ASCII is selected.
  998.  
  999. If you want to send files this way to a mainframe, beware of the fact that many
  1000. mainframes can't handle very fast input. In fact, the IBM and VAXes at SLAC
  1001. usually don't like ASCII transfers to them at all. Many bulletin boards and
  1002. online services do allow this, though. Simply set up the editor on the bulletin
  1003. board in input mode and then select the    Send File  option. As in all other
  1004. cases you will be presented with a file requester which you can use to find the
  1005. Amiga file you want to send.
  1006.  
  1007.    Kermit transfer  is the protocol of choice for sending files to and from
  1008. the mainframe if you wish to send binary files (i.e. compiled programs) or wish
  1009. to have error checking performed during the transfer. The way to do a simple
  1010. file transfer was already explained in the previous paragraph. Note that if you
  1011. use this method then you must set your various options using the    Kermit
  1012. Options  submenu.
  1013.  
  1014.    XMODEM transfer  is not available for transfer to and from the IBM, however
  1015. it can be used for transferring files to and from the VAXes at SLAC. To get the
  1016. companion program VAXXMODEM for the VAX get in touch with Willy Langeveld,
  1017. WGLP09 at SLACVM. If you select this protocol then you have to set your XMODEM
  1018. default parameters using the    XMODEM options submenu .    NOTE  XMODEM
  1019. transfers are aborted in the same way as Kermit transfers; namely, you hit the
  1020. ESC key.
  1021.  
  1022.   Kermit Options 
  1023.  
  1024. When you select this option a submenu will appear which allows you to choose
  1025. among two different ways of using Kermit, and which also provides you with a way
  1026. of setting the default directory into which files coming to the Amiga are to be
  1027. placed. To change the default directory simply select the    Change Directory 
  1028. option from the submenu. When you do this a simple requester will appear which
  1029. contains a single string gadget. The current default directory will be displayed
  1030. in this gadget. All you have to do is replace the displayed string with another
  1031. of your choosing.
  1032.  
  1033. The other three options control the way in which Kermit is used. Up to now we
  1034. have discussed using Kermit in the mode wherein file transfers are handled by
  1035. running Kermit on the mainframe each time you wish to carry out a file transfer.
  1036. This method is selected by the first option,    Send/Receive . There is
  1037. however a second way of using Kermit and that is in    server   mode. In this
  1038. mode Kermit runs continuously on the mainframe and blocks all keyboard input,
  1039. however in that case the Amiga can control all file transfer from its end. To
  1040. use this option select    Host is Server . (If you have read the documentation
  1041. on the IBM then you might want to know that then the receive command implements
  1042. the    KERMIT GET  command.) If you set up for    Host is Server  then
  1043. selecting    Receive File  will bring up a requester which wants you to fill
  1044. in the name of a file on the mainframe. The disadvantage of using this mode is
  1045. that you cannot use FILELIST, etc., in order to find the name of a file which
  1046. you have forgotten. For those who have AREXX the Filelist_to_Amiga macro
  1047. provides a more convenient way of accomplishing mainframe to Amiga file
  1048. transfers.
  1049.  
  1050. The last option in the submenu is the    Kermit Bye . This option is necessary
  1051. if you are running the mainframe Kermit in server mode in order to tell it you
  1052. are finished and want it to terminate itself and return control of the terminal
  1053. to you. Remember, while Kermit is in server mode all keyboard input to the IBM
  1054. is blocked.
  1055.  
  1056. Notice, that this version of Kermit supports also what is known as `long packet'
  1057. kermit. For details on how to use that feature on the mainframe refer to your
  1058. local expert.
  1059.  
  1060.   XMODEM Options 
  1061.  
  1062. Choosing this command brings up another submenu which allows you to choose the
  1063. type of XMODEM error checking which will be used in file transfer, as well as
  1064. the size of the packets which will be sent. Selecting the first option sets
  1065. error checking to consist of a simple check sum and uses short blocks for file
  1066. transfer. The second uses the same simple error checking but transfers packets
  1067. which have a length of one kilobyte. Since long packets are used this file
  1068. transfer goes faster, but with a greater chance of error. The next two choices
  1069. use a more complicated form  of error checking (CRC). The third choice specifies
  1070. short packets and the last choice specifies long packets.
  1071.  
  1072.   Translate Options 
  1073.  
  1074. The final menu item brings up a submenu which controls the way in which binary
  1075. files are transferred and the way in which files are assigned default names
  1076. based upon the name they had on the mainframe. In general, to transfer an ASCII
  1077. file you wish to select the second option, CR/LF -> LF, as your default. This
  1078. is because on the IBM the end of a line of text is terminated with both a
  1079. carriage return and a line feed character, whereas on some other machines the
  1080. end of a line is signified simply by a line feed. Obviously, when ASCII files
  1081. are sent to the mainframe the opposite translation takes place if this option is
  1082. selected. To verify that this option is switched on look for a check mark to the
  1083. left of this item on the submenu. No check mark means that no such translation
  1084. is taking place.
  1085.  
  1086. The first option,    No translation , is only selected when a binary file is
  1087. being transferred (binary files are executable programs on either the mainframe
  1088. or the computer, or the output of graphics programs). In order to carry out a
  1089. binary file transfer to the IBM you have to set up both the mainframe and Amiga
  1090. properly. This is slightly more complicated to do than it was in the case of
  1091. ASCII file transfer. First go to the    Transfer  menu and select    No
  1092. translate  from the    Translate Options  submenu. To transfer a binary file
  1093. to the IBM you first set up the mainframe Kermit by typing
  1094.  
  1095.    KERMIT 
  1096.  
  1097. and then you wait for the prompt to appear, at which point you type
  1098.  
  1099.    SET FILE BINARY 
  1100.    RECEIVE FN FT FM 
  1101.  
  1102. When the screen clears you are ready to go to the menu and select    Send
  1103. File . When the file transfer completes you have to leave Kermit by hitting
  1104. RETURN once or twice to get its attention and then type
  1105.  
  1106.    QUIT .
  1107.  
  1108. To get a binary file from the IBM to the Amiga you proceed in the same way
  1109. except that you give the IBM the command
  1110.  
  1111.    SEND FN FT FM 
  1112.  
  1113. after setting the file to be binary, and you select the    Receive
  1114. File  option on the Amiga.
  1115.  
  1116. The final submenu option simply tells VLT whether or not to automatically to
  1117. convert names on the mainframe to lower case on the Amiga.
  1118.  
  1119. This completes our discussion of the menu commands which control file transfer.
  1120. Next we turn to the menu which controls VLT 's rather sophisticated scripting
  1121. capabilities.
  1122.  
  1123.  
  1124.  
  1125.      Macros
  1126.        AREXX Macro
  1127.        VLT Macro
  1128.        Abort VLT Macro
  1129.        Keyboard Macro
  1130.        Program Mode
  1131.  
  1132.    The Macros Menu
  1133.  
  1134. VLT can be programmed by the user to perform highly specialized operations on
  1135. two levels. On the low level, you can write scripts in VLT's own simple command
  1136. language. On the higher level, you can combine this simple command language with
  1137. AmigaREXX, if available. These scripts can be executed by specifying the name of
  1138. the script file after selecting from the menu which type of script you want to
  1139. execute, or by assigning one of eighty programmable keyboard sequences to
  1140. execute such a script file or an in-line script command.
  1141.  
  1142.   AREXX Macro 
  1143.  
  1144. When you select this menu option the file requester appears and displays the
  1145. files found in your    rexx:  directory (usually you will have assigned   
  1146. rexx:  to be either DF0:REXX or VD0:REXX) having file extension    .vlt . For
  1147. SLAC users we have included a sample  bf rexx  directory on the distribution
  1148. disk and it contains four sample AREXX macros (or scripts), two of which make it
  1149. easier to handle file transfer to and from the IBM, one which simply resets the
  1150. IBM if something messes up the screen and you don't know what to do, and one
  1151. which opens a TxEd Plus session on your Workbench screen. The names of these
  1152. files are:
  1153.  
  1154.     o rexx:Amiga_to_IBM.vlt
  1155.     o rexx:Filelist_to_Amiga.vlt
  1156.     o rexx:Reset_IBM.vlt
  1157.     o rexx:Open_Txed.vlt
  1158.  
  1159. To execute one of these files simply double click on it, or single click on it
  1160. and then click on the OK gadget. The file transfer macros will explain
  1161. themselves when you invoke them.
  1162.  
  1163. The explanation of what is in these macros and a list of the commands which are
  1164. understood by VLT will be given in the next section devoted to writing
  1165. scripts.
  1166.  
  1167.   VLT Macro 
  1168.  
  1169. As we already noted, all of the commands which VLT understands can be run from
  1170. a file with file extension    .scp . Examples of such files will appear in the
  1171. next section. The file requester which appears when you select this menu option
  1172. automatically assumes that these files will be found in your current directory;
  1173. however, if you keep them elsewhere you can find them and execute them in the
  1174. same way as you find any file.
  1175.  
  1176. The difference between AREXX macros and VLT script files is that AREXX allows
  1177. for scripts written in a powerful BASIC-like language. Also, AREXX scripts run
  1178. asynchronously with VLT itself. These scripts allow you to carry out various
  1179. local operations, modify files, etc. and then to carry out various terminal
  1180. operations when appropriate. This can be anything, e.g. opening a file,
  1181. searching it for relevant information, or changing something in it, and then
  1182. transferring it automatically to the mainframe when your local procedure is
  1183. finished. VLT scripts, on the other hand, are limited in what they can do and
  1184. run under the control of the VLT program itself.
  1185.  
  1186.   Abort VLT Macro 
  1187.  
  1188. As we said, since AREXX macros run independently of VLT they do not interfere
  1189. with its operation and if they abort the error messages are sent to a CLI. Since
  1190. VLT scripts do not run in this way there must be a way to abort a script once
  1191. it has started. Selecting the    Abort VLT Macro  accomplishes this feat for
  1192. you.
  1193.  
  1194.   Keyboard Macro 
  1195.  
  1196. Selecting this menu option brings up a submenu which allows you to carry out the
  1197. operation that is equivalent to the keyboard command ra  n (where n stands
  1198. for a number from 0 to 9 to be found on the top row of the keyboard).
  1199.  
  1200.   Program Mode 
  1201.  
  1202. Selecting this menu option reveals a submenu which gives you a choice of having
  1203. program mode    On  or    Off ; the default is of course having program mode
  1204. off. If one wishes to reprogram the behavior of the function keys, on screen
  1205. PFkey gadgets or any ra  n sequence, all one has to do is set program mode on
  1206. and then hit the appropriate sequence. When this is done a requester will appear
  1207. which will display the command which is currently assigned to this key. All you
  1208. have to do is change this string to another string and then hit RETURN; the
  1209. requester will then disappear. Aside from the thirty on-screen gadgets and the
  1210. R-A n sequences, the function keys are programmable by themselves, as well as
  1211. when either the SHIFT, CTRL or  ALT key are pressed simultaneously. When you are
  1212. finished reprogramming the keys that you wish to change simply turn program mode
  1213. off and then go back to the    VLT  menu and select the    Save
  1214. Configuration  option. VLT uses the ARP conventions for embedding escape,
  1215. control, linefeed, etc. characters in strings; this is all explained in the next
  1216. section devoted to writing scripts.
  1217.  
  1218.     Screen
  1219.        Clear Screen
  1220.        Screen to Back
  1221.        Select Screen Type
  1222.        Number of Colors
  1223.        Select Colors
  1224.        Number of Lines
  1225.        Number of Columns
  1226.        Amount of Prescroll
  1227.        Rendering Mode
  1228.  
  1229.    The Screen Menu
  1230.  
  1231. The menu options provided in this menu are concerned with setting various
  1232. properties of the text screen. In order to fully understand how some of the
  1233. commands work you have to understand that, in addition to being able to open
  1234. multiple windows on the Workbench screen, the Amiga supports the concept of
  1235. multiple custom screens. Following the desktop metaphor you can think of the
  1236. screen as the desktop and the windows, which belong to a given screen, as pieces
  1237. of paper, or file folders, which can be placed anywhere on a given desktop but
  1238. which cannot be moved from one desk to another. Multiple windows can be opened
  1239. on a given screen and when such a window is opened it allows us to look inside a
  1240. given folder.
  1241.  
  1242.          Windows may contain arbitrarily different contents, however all of the
  1243. windows which open on a given screen share certain display characteristics. For
  1244. example, all windows on a given screen have the same number of colors available
  1245. to them. The Workbench Screen (this is the screen which you see when you first
  1246. boot) can display only four colors. You can use the Preferences tool to set
  1247. these four colors to be any four chosen out of a palette of 4096 possible
  1248. colors, however once you have done this then all  windows which open on the
  1249. Workbench screen use the same four colors.  Windows also inherit their display
  1250. characteristics from the screen they are on. For example, if the screen is
  1251. interlaced (i.e. this is the default for SLACDISK) then the windows which open
  1252. on it will be too.
  1253.  
  1254.          Screens and windows differ in a very important way. In general, most
  1255. windows can be resized and moved around on their screen by using the mouse to
  1256. grab their drag and resizing gadgets. I say, in general, because it is possible
  1257. to open windows which have neither drag gadgets, nor resizing gadgets, nor close
  1258. gadgets, nor front to back gadgets, etc.; in fact, one can open windows which
  1259. have no borders at all. Nevertheless, in general, windows can be moved
  1260. horizontally and vertically, they can overlap one another, they can be opened
  1261. and closed, and their sizes can be changed. Screens are not this flexible.
  1262. Screens never have close gadgets (they open and close only under the control of
  1263. a program) and they cannot be resized. Also, screens must occupy the full width
  1264. of the display, although they can slide up and down to reveal anything which
  1265. lies behind them. Thus, like windows, screens can overlap one another and also,
  1266. like windows, they can have front to back gadgets. In other words, if a screen
  1267. has a drag bar at the top you can grab it with a mouse and slide it down to
  1268. reveal a screen in back of it, or you can click on its front to back gadget to
  1269. place it in back of any other screen which is open; however you cannot move it
  1270. to the right or left. Thus, if more than one screen is open, say screen A and
  1271. screen B, then A can be moved in front of B, or B can be moved in front of A by
  1272. clicking on their front to back gadgets,  if they have them. If there are back
  1273. to front gadgets on the screen they  will be located in the right hand corner of
  1274. the drag bar.
  1275.  
  1276.          VLT allows you to open both the text and graphics windows either on
  1277. the Workbench screen, or on separate custom screens. If you open on the
  1278. Workbench screen then your Workbench windows can be moved in front of the
  1279. terminal screen. This can be very useful if, for example, you wish to shrink a
  1280. CLI or application window to a small size and keep an eye on what is going on in
  1281. that window while you are doing something on the mainframe. The disadvantages to
  1282. opening the terminal program on the Workbench screen is that the displays are
  1283. limited to only four colors and the disk icons will be obscured. If you open a
  1284. custom screen then you can have up to eight colors on the text screen (to
  1285. provide for full color highlighting by the mainframe) and up to sixteen colors
  1286. on the graphics screen. If you open on a custom screen then you can set all the
  1287. colors for that screen while you are running the program and save these values
  1288. to your configuration files.
  1289.  
  1290. In order to give you the best of both worlds VLT provides menu options which
  1291. allow you to change your current screen characteristics at will without shutting
  1292. down the program. Also, since in order to be able to display the maximum number
  1293. of lines we open the VLT window without a drag bar, front to back gadgets,
  1294. close gadgets, etc., we provide keyboard and menu options to control the
  1295. positioning of the VLT window (and/or screen) relative to the Workbench
  1296. screen.
  1297.  
  1298. Having provided you with this review of basic facts about windows and screens
  1299. (read your Amiga manual for more information) let us turn to the commands in the
  1300. Screen  menu and see what they do for you.
  1301.  
  1302.   Clear Screen 
  1303.  
  1304. This command does just what it says, it provides a local way of clearing the
  1305. screen without sending anything to the mainframe.
  1306.  
  1307.   Screen to Back 
  1308.  
  1309. Technically, this command does different things depending upon whether the VLT
  1310. text window is open on  the Workbench screen or a custom screen. If you are on
  1311. the Workbench screen then it simply puts the VLT text window behind all of the
  1312. other windows on the Workbench screen. Thus, if prior to running VLT you
  1313. clicked on the various disk icons and opened windows which display other icons,
  1314. these windows will come to the front, so will any CLI windows which are open on
  1315. the Workbench. If however you have not clicked on any of these icons and there
  1316. are no CLI windows open on the Workbench screen, then this command will do
  1317. nothing. Once VLT is running there are only two things you can do to get at
  1318. the disk icons on the Workbench screen. One thing is to quit VLT , the second
  1319. thing is to move VLT to a custom screen, do what you want about the disk icons
  1320. and then, if you wish, put VLT back on the Workbench screen.
  1321.  
  1322. If you have VLT opened on a custom screen, this command will move all VLT's
  1323. screens in back of the Workbench screen.
  1324.  
  1325.   Select Screen Type 
  1326.  
  1327. This is the item you select in order to change the current status of the VLT
  1328. text window and move it to and from the Workbench screen. When you select this
  1329. item a submenu appears with the choices,    Custom ,    Workbench ,   
  1330. Interlaced  and    Non--Interlaced . If you select    Workbench  then the
  1331. text window will be opened on the Workbench screen. In that case it inherits the
  1332. number of colors and display characteristics of the Workbench screen and the
  1333. Interlace  and    Non--Interlaced  options will do nothing. If you select
  1334. Custom  then VLT opens a custom screen, independent of the Workbench
  1335. screen, for the text window; then you may choose this screen to be either
  1336. interlaced or non-interlaced.
  1337.  
  1338.   Number of Colors 
  1339.  
  1340. This option allows you to select the number of colors that can be displayed on
  1341. the terminal text screen. Since the number of colors which can be displayed on a
  1342. Workbench screen is fixed to be four, this option only works if you have already
  1343. selected your    Screen Type  to be    Custom . If you are on a custom
  1344. screen then you have the option of using 2, 4 or 8 colors on your text screen.
  1345.  
  1346.   Select Colors 
  1347.  
  1348. If you select this option then a palette requester appears on your screen. This
  1349. gadget works just like the one in preferences and allows you to interactively
  1350. change the colors on your screen by moving the sliders with the mouse. To change
  1351. a color simply click on the square showing that color and then move the R (red),
  1352. G (green) and B (blue)  sliders until you change the color to one closer to your
  1353. heart's desire. If, for example, the red slider is moved all the way to the left
  1354. than the amount of red in the color you are making will be zero; if, on the
  1355. other hand it is all the way to the right then you will have added the maximum
  1356. amount of red to the color.
  1357.  
  1358.   Number of Lines 
  1359.  
  1360. If you are logging on to the mainframe at SLAC it will always set the number of
  1361. lines on the screen to be 24 until you change it by issuing the command
  1362.  
  1363.    MODEL 3 -- for 32 lines 
  1364.  
  1365. or
  1366.  
  1367.    MODEL 4 -- for 43 lines 
  1368.  
  1369. If you are not on the IBM, then you might wish to change the number of lines to
  1370. be displayed without relying upon the mainframe to do it for you. In this case
  1371. simply select this menu option. When you do this a requester will appear and the
  1372. number of lines which are currently being displayed will be shown in the string
  1373. gadget. Simply modify this number and hit RETURN and the new default number of
  1374. lines will be established. If you wish to make this the number of lines which
  1375. are to be used every time you run VLT just choose the    Save Configuration 
  1376. option after making this change.
  1377.  
  1378.   Number of Columns 
  1379.  
  1380. VLT in principle allows you to set the screen to display any number of
  1381. columns. The limitations upon what can actually be displayed are the size of the
  1382. screen and the size of the font being used. Thus, although you could, in
  1383. principle display 132 columns, since we do not have a font small enough for this
  1384. purpose we would advise against it. You can however use this setting to affect
  1385. where the text appears in the VLT window. If you use 80 columns, then it will
  1386. be roughly centered; however, if you use 85, for example, it will be moved left
  1387. on the screen. Note, that for some applications on your mainframe, 80 columns
  1388. may be required.
  1389.  
  1390.   Amount of Prescroll 
  1391.  
  1392. This option is of interest primarily to VAX users who are likely to want to use
  1393. VLT in scrolling mode and who want it to scroll at least as fast as an
  1394. Ambassador. Since scrolling the screen is a fairly time consuming process,
  1395. scrolling through files with many short lines can start to slow everything down
  1396. unless one does something to cut down on the number of scrolls. The solution
  1397. adopted here is to simply look ahead about 100 characters at the text coming from
  1398. the mainframe and, if there are many carriage returns, simply scroll a number of
  1399. lines in one step. Prescroll determines the maximum number of lines which will
  1400. be scrolled at once. We have found 8 to be a number which provides fairly smooth
  1401. scrolling without sacrificing much in the way of speed. Setting the prescroll
  1402. variable proceeds in exactly the same way as setting the number of lines, or the
  1403. number of columns.
  1404.  
  1405.  
  1406.   Rendering Mode 
  1407.  
  1408. This option allows you to affect the way in which VLT handles highlighting,
  1409. etc. as it is sent from the mainframe. If you select a custom, eight color,
  1410. screen and select the    Color  option from the    Rendering Mode  submenu,
  1411. then highlighted, unhighlighted, protected, unprotected (or equivalently, bold,
  1412. underlined, reverse video and italic) will be displayed by different colors. If
  1413. you select the    Normal  option then normal text will be displayed in one
  1414. color and all highlighted and protected fields will be displayed in another
  1415. (highlighting) color. If you select the    Quick  option, then instead of
  1416. displaying highlighted material in a different color it will be displayed in
  1417. bold face type, or indeed as originally intended, in reverse video or italic or
  1418. underlined. This mode is provided in order to speed up scrolling yet further,
  1419. since in this mode text is being rendered only onto what is effectively a two
  1420. color screen. This option, together with a prescroll setting of 8, is sufficient
  1421. to provide scrolling which is faster than that of an Ambassador terminal at
  1422. 9600 baud. Even further speed-up can be gained by using no more than four colors
  1423. on your text screen. If you prefer to live in non-interlaced mode, the text
  1424. update speed is increased by another factor of two (the effective update speed
  1425. has been measured under these conditions to be of the order of 26 kbaud).
  1426.  
  1427.     Operation
  1428.        Wrap
  1429.        Numeric Keypad
  1430.        Application Cursor
  1431.        Swap BS<->Delete
  1432.        Help Key=LF
  1433.        Shift-Tab= ESC TAB
  1434.        Function Key Gadgets
  1435.        Mouse Support
  1436.        Beep Volume
  1437.  
  1438.    The Operation Menu 
  1439.  
  1440. This menu controls display characteristics of the terminal and various things
  1441. having to do with the way in which keys on the keypad behave. It also controls
  1442. whether or not you get an audible or visual beep.
  1443.  
  1444.   Wrap  This controls whether or not the terminal automatically handles
  1445. wrapping at the end of a line. The default setting is off, as the mainframe
  1446. usually takes care of this for you in most situations.
  1447.  
  1448.   Numeric Keypad   Ordinarily the numeric keypad is set up to operate in
  1449. function key mode. This is useful on the VAX and on the IBM. On the VAX the
  1450. keypad is used in the same manner as it is used on a VT100. When logged onto the
  1451. IBM it is used to access the 24 PFkeys that are available on the Ambassador, IBM
  1452. 3270, etc., terminals. To shut off this option and use the numeric keypad so
  1453. that unshifted characters provide numbers etc., simply select this option.
  1454.  
  1455.   Application Cursor  This feature is there in order to give the user
  1456. control over the way in which the cursor keys (the ones with arrows on them
  1457. arranged in a T between the alphabetic and numeric keypad) operate. When
  1458. deselected these keys behave as expected on the IBM. Normally you would leave
  1459. this option deselected and VAX editors will reprogram these keys as necessary.
  1460.  
  1461.   Swap BS<->Delete   This is provided as a courtesy to VAX users who
  1462. wish to interchange the function of the backspace and delete key (the backspace
  1463. key is the key with the arrow just to the left of the delete key).
  1464.  
  1465.   Help Key = LF   Since the Amiga keyboard does not provide a labelled
  1466. linefeed key we have allowed the user, if he so desires, to program the Help key
  1467. to perform this function. Selecting this key allows you to use the Help key to
  1468. perform the same function as the LF key on an Ambassador. However, since the
  1469. Amiga 1000 has a different numeric keypad layout, the help key otherwise has the
  1470. same function as the + key on Amiga 500/2000's. If you own an Amiga 1000, you
  1471. can program the function keys 1 through 4 to play the role of the top four
  1472. keys on the A500/2000 numeric keypad (VT100 PF1 through PF4).
  1473.  
  1474.   Shift-Tab = ESC TAB  When this option is selected, the shifted TAB key
  1475. (the one with the two arrows at the left hand side of the keyboard)  will send
  1476. the sequence ESC TAB to the mainframe, which effectively for SLAC VM means back
  1477. tab. When not selected, the shifted TAB key just sends the same as the unshifted
  1478. TAB key.
  1479.  
  1480.   Function Key Gadgets   Since some users would prefer not to have the
  1481. mouse operated function key gadgets on the screen, and would rather spread 43
  1482. (or more) lines of text over  a greater area, we have provided this switch which
  1483. turns the function key gadgets on or off. This means that you can operate with
  1484. the gadgets turned off and get them back when you want to lean back and mouse
  1485. around simply by selecting the menu option or typing ra P.
  1486.  
  1487.   Mouse Support   When this option is selected then positioning the
  1488. cursor on the screen and clicking the left mouse button will tell the mainframe
  1489. to move your cursor to that position on the screen. It provides a substitute for
  1490. using the arrow keys on the cursor application pad. This is very useful on the
  1491. mainframe when in Xedit, etc. but does not necessarily work on all mainframes.
  1492.  
  1493.   Beep Volume   Since we do not recommend the use of a Commodore monitor
  1494. for terminal emulation because of the flicker problem it is highly unlikely that
  1495. the monitor you purchase will have a built in speaker. Because of this you will
  1496. either have to go out and purchase a small speaker with a built-in amplifier or
  1497. hook up the outputs on the Amiga 2000 to your stereo in order to get an audible
  1498. beep. If you have a speaker available you set the volume of the beep by
  1499. selecting this item and typing a number from 1 to 60 in the string gadget which
  1500. appears. If you do not have a speaker available, then setting this number to
  1501. zero will provide you with a visual beep; i.e., the screen will flash instead.
  1502.  
  1503.  
  1504.     Graphics
  1505.       Lock Graphics
  1506.       To Graphics
  1507.  
  1508.    The Graphics Menu
  1509.  
  1510. This menu has two commands, the second is self-explanatory in that it does
  1511. exactly what it says, it puts you on the graphics screen (recall that we already
  1512. said graphics is  exhibited on a second, independent window or screen). If this
  1513. screen is not already open then this command causes the screen to be opened. It
  1514. then switches you to that screen. The first command is the only one which
  1515. requires some explanation, after all, what does it mean to    Lock Graphics .
  1516.  
  1517. To understand this you have to know that VLT supports a set of special
  1518. characters and escape sequences which the mainframe can send in order to switch
  1519. you to the graphics screen for subsequent output. It supports a second set of
  1520. sequences which switch you back to the text screen. Unfortunately, if you are on
  1521. a noisy line, or if you are logged on to the IBM and leave your terminal for a
  1522. long time, then it is not unlikely that in disconnecting you the mainframe will
  1523. send some kind of garbage which will throw you onto the graphics screen. To
  1524. prevent this from happening by accident all you have to do is select the   
  1525. Lock Graphics  option. In that case VLT disables the escape sequence which
  1526. throws you onto the graphics screen.
  1527.  
  1528. This completes our discussion the menu options associated with the text screen.
  1529. Now we turn to a discussion of the menu options which are associated with the
  1530. graphics screen.
  1531.  
  1532.  
  1533.  
  1534.   Menus Associated With the Graphics Screen
  1535.  
  1536. When you are on the graphics screen and hold down the right mouse button the
  1537. menu bar appears and on it you will find displayed the names of the five
  1538. menus 
  1539.  
  1540.      Image    Zoom/Pan   Cursor  Screen   Control     
  1541.  
  1542. In this section of the manual we will provide a very non-technical discussion of
  1543. the items appearing in each of the menus. A more complete discussion of the
  1544. technical details of exactly what kind of Tektronix emulation is being provided
  1545. and how it differs from emulations available on other terminals appears in
  1546. Appendix II. A programmer's manual for the Tektronix emulation is given in
  1547. Appendix III.
  1548.  
  1549.  
  1550.     Image
  1551.        Save to Current File
  1552.        Save to New
  1553.        Load from Archive
  1554.        Quit Archive
  1555.  
  1556.  
  1557.    The Image Menu
  1558.  
  1559. The selections in the Image  menu are concerned with saving vector graphics
  1560. files (which are coming from the mainframe) either to a archive file you have
  1561. already chosen, called the Current File, or to a new archive file of your
  1562. choice. Old files which have been saved to an archive can be displayed on the
  1563. graphics screen without losing the current display which has just been sent from
  1564. the mainframe. To return to the current file all you have to do is Quit the
  1565. archive file. Keyboard alternatives, when they exist, are shown to the right of
  1566. the menu item, and the    Save to New  and    Load From Archive  commands
  1567. use Charlie Heath's file requester to get the name of the file you wish to save
  1568. or load. If you select one of these items and there is no current file a message
  1569. window will open and let you know this fact.
  1570.  
  1571.     Zoom/Pan
  1572.       Select Zoom Area
  1573.       Select Pan Area
  1574.       Reset Zoom/Pan
  1575.  
  1576.    The Zoom/Pan Menu
  1577.  
  1578.   Select Zoom Area
  1579.  
  1580. VLT supports true zoom.
  1581.  
  1582. This means that one can magnify any section of a picture which has been
  1583. downloaded from the mainframe to an arbitrary degree without loss of the
  1584. resolution which was present in the original picture. To select the area to be
  1585. magnified  simply position the cursor at the upper left hand corner of the
  1586. region of interest, hold down the left mouse button and then move the mouse to
  1587. drag out a rectangle which will define the zoom area. When you have
  1588. satisfactorily outlined the area you are interested in viewing at greater
  1589. magnification simply release the left mouse button.
  1590.  
  1591.   Select Pan Area  Once you have zoomed in on a region of a picture you
  1592. might want to slide the viewport over so as to reveal another region of the
  1593. magnified picture without having to first redraw the original and then zoom in
  1594. on a new region. To do this you select the pan option. Having done this you hold
  1595. down the left mouse button and move the mouse in the direction in which you wish
  1596. to have the display region move. A frame will appear as you do this in order to
  1597. show you how your new display region will be positioned relative to the picture
  1598. currently being displayed on the screen. Panning is only possible if you are
  1599. looking at a picture which has already been zoomed (with the exception that
  1600. VLT will allow you to pan upwards a limited amount).
  1601.  
  1602.   Reset Zoom/Pan  does just what it says, it causes the original,
  1603. unzoomed picture to be displayed upon the screen.
  1604.  
  1605.        Cursor
  1606.           Switch Graphic Cursor On
  1607.           Switch Graphic Cursor Off
  1608.           Display Cross-Hair Only
  1609.           Display Cross-Hair + XY
  1610.  
  1611.    The Cursor Menu
  1612.  
  1613. This menu provides commands for turning cross hairs on and off and controlling
  1614. the information which is displayed upon the screen when the cross hairs are
  1615. turned on. Under ordinary circumstances only the last menu option is meant to be
  1616. used, the other features are really meant to be turned on and off under the
  1617. control of the mainframe. Sometimes, however, it is convenient when viewing a
  1618. graph to be able to display the cross hairs in order to make it simpler to read
  1619. the coordinates of a point off a graph; in that case these menu options provide
  1620. the user with the ability to toggle the graphics cross hairs on and off under
  1621. local control. If you select the last option then when the cross hairs are
  1622. displayed the coordinates of the cross hairs relative to the bottom left hand
  1623. corner of the screen are also displayed (in Tektronix pixel coordinates). This
  1624. feature is useful if you are using the cross hairs to interact with a mainframe
  1625. graphics program and want to position the cursor very accurately.
  1626.  
  1627.       Screen
  1628.          Clear Screen
  1629.          Screen to Back
  1630.          Select Screen Type
  1631.          Select No. of Colors
  1632.          Select Colors
  1633.          Close Screen
  1634.  
  1635.      The Screen Menu
  1636.  
  1637. The entries in this menu are self explanatory given the discussion of the
  1638. analagous menu options for the text screen.    Clear Screen  allows you to
  1639. erase the screen under local control.    Screen To Back  moves the VLT
  1640. screens to the back of all other screens which are open (think of these screens
  1641. as being arranged like a stack of cards).    Select Screen Type  lets you
  1642. change the screen from a Workbench Screen to a Custom Screen and back.   
  1643. Select No. of Colors  lets you choose the number of colors which can be used to
  1644. display graphics on a Custom Screen (nothing can be done about the fact that the
  1645. Workbench screen only displays four colors). Unlike the case of the text screen,
  1646. the graphics screen can display up to 16 colors out of a palette of 4096. These
  1647. colors are selected by bringing up the same palette gadget that you became
  1648. familiar with for changing the colors of the text screen. If you are finished
  1649. displaying graphics and wish to recover the memory being used to keep the
  1650. graphics screen open you simply select the    Close Screen  option. If, at any
  1651. later time, you wish to display more graphics, then this screen will
  1652. automatically reopen itself if there is enough memory available.
  1653.  
  1654.  
  1655.      Control
  1656.        Return to Alpha--Numeric
  1657.        Set Preferences
  1658.  
  1659.  
  1660.    The Control Menu
  1661.  
  1662. This menu has only two options. The first provides a way of manually getting
  1663. back to the text screen from the graphics screen. The second menu brings up a
  1664. requester which allows you to choose the kind of graphics terminal emulation
  1665. which you get. This requester is different from the others, however it works in
  1666. the same way. Some items are just names of different options, simply click on
  1667. the one you wish to select. Other items are string gadgets which contain
  1668. numerical information which you can set; in order to modify an entry click on it
  1669. and then type what you want into the space provided. Use the backspace and
  1670. delete key to erase material already present. After you have set up all of your
  1671. preferences simply click on the    Save  gadget and these settings,    along
  1672. with all of your color settings  , will be saved to a file in your    s:  
  1673. directory called    s:TekPrefs.dat .
  1674.  
  1675. The first option which you can select is whether or not the graphics screen
  1676. emulates a true Tektronix 4010/4014 terminal, or whether it provides an extended
  1677. emulation. If you select the extended emulation then the graphics mode will
  1678. accept additional escape sequences which allow the mainframe to perform many of
  1679. the functions performed by an Ambassador GXL; for example, toggling you between
  1680. the graphics and text screens automatically. The details of the extra escape
  1681. sequences recognized in Extended mode are provided in Appendix III. If you are
  1682. using the terminal at SLAC and have no reason to dig into technical details then
  1683. simply select the    Extended  option. Note, the    Amiga   option is not
  1684. currently implemented and cannot be selected. In fact, we are not really sure
  1685. what extra features it will support.
  1686.  
  1687. The next option which you can set has to do with how cursor reports are returned
  1688. to the mainframe. Suppose for example, that a mainframe application has brought
  1689. up the cross hairs (i.e., the graphics cursor) and you are expected to position
  1690. the cursor over some point on the screen and then you are supposed to hit a key.
  1691. The mode that you are currently in is called the graphics input mode and the
  1692. report options have to do with what information is sent back to the mainframe
  1693. after you hit a key. In general this information consists of the key which you
  1694. hit, the location of the cursor on the screen (i.e., its XY coordinates) and
  1695. then some kind of end of report sequence to tell the mainframe that you have
  1696. completed the operation. The default is to terminate a report by sending a
  1697. carriage return, the other two options are discussed in Appendix II. If you are
  1698. at SLAC it is recommended that you select the default option.
  1699.  
  1700. In addition to the question of how one should terminate a report to the
  1701. mainframe there is the question of what type of report should be sent. This
  1702. option controls whether or not the XY coordinates are taken to run over the
  1703. range  0 to 1024, or 0 to 4096. If you select    4010/14 Report  then the
  1704. cursor coordinates will be sent assuming that the screen has 1024 times 1024
  1705. pixels; if the extended report is chosen the the cursor location will be sent as
  1706. if the screen display consisted of 4096 times 4096 pixels. The default
  1707. option, which is the one to be used at SLAC, is the    4010/14 Report .
  1708.  
  1709. The freedom to adjust the display size allows you to select the horizontal and
  1710. vertical extent of the display region on the screen. Adjusting these values
  1711. allows you to correct for faulty aspect ratios in some plots, and also allows
  1712. you to set up a sort of global magnification. In general the defaults which are
  1713. set in the    s:TekPrefs.dat  file provided are reasonable values to start
  1714. with. You can play around with these and see if you prefer values which are
  1715. slightly different. If you have a very different screen size, you may wish to
  1716. delete TekPrefs.dat entirely and have VLT recalculate the best values for you.
  1717.  
  1718. The incremental step options has to do with how far the cursor moves each time
  1719. it receive a ``move one pixel'' command from the mainframe to change location.
  1720. Ordinarily this should be set at 1/4096.
  1721.  
  1722. Finally, there is the question of the mouse character. The reason this is
  1723. included is to allow the user to program the left mouse button to send a single
  1724. letter when clicked. Thus, the user can initiate a cursor report without having
  1725. to hit the keyboard. If, however, a letter other than the default set in this
  1726. option is needed then keyboard input will be required.
  1727.  
  1728.   Saving All Settings  All graphics screen settings will be saved to the
  1729. file    s:TekPrefs.dat  when you click on the    Save  gadget. Having done
  1730. this, these settings then become the default settings which will be used
  1731. whenever the graphics screen is opened.
  1732.  
  1733.       To temporarily change the settings you
  1734. should click on the    Use  gadget. If you wish to forget the whole thing
  1735. click on the    Cancel   gadget. To start over from previously saved settings
  1736. click on the    Reset  gadget. Clicking twice on the    Reset   gadget
  1737. returns the graphics screen to VLT 's ``factory'' settings.
  1738.  
  1739.  
  1740.  
  1741.  
  1742.          Writing Scripts 
  1743.  
  1744.    What Are Scripts? 
  1745.  
  1746.   Very often people wish to program the terminal program to carry on some boring
  1747. or repetitive task without demanding their personal attention. For example, a
  1748. person who often logs on to the same mainframe might want to automate his logon
  1749. procedure up to the point where he types in his password (never put your
  1750. password into the program as this makes it trivial for anyone using your machine
  1751. to discover what your password is). To make this possible many terminal programs
  1752. support a macro (or script) language. VLT has its own fairly sophisticated
  1753. scripting language which can be run even without AREXX in your machine and which
  1754. will allow you to carry out simple tasks of this type. Using this macro
  1755. capability you can write scripts which can set most of the parameters which can
  1756. be set from the menus, initiate file transfers and send strings to the
  1757. mainframe. All of this, however, is run from within the terminal program, and
  1758. while a script is running the rest of the program is essentially shut down.
  1759. Also, while the native scripting capability of VLT is fairly powerful it is
  1760. not a real programming language and it has no ability to interact with other
  1761. programs which might be running at the same time.
  1762.  
  1763. If, on the other hand,  AREXX are present then VLT 's native scripting
  1764. capability becomes part of a full, BASIC--like, programming language that
  1765. co-exists within the Amiga's unique multi-tasking operating system. Because of
  1766. this it is possible to write scripts that do all the aforementioned things, but
  1767. many more things are possible. For example, if one is on a bulletin board and
  1768. wishes to send mail, but one is unhappy with the editor provided there, it is a
  1769. trivial matter to set the scrolling area of the terminal to only occupy the
  1770. upper half of the screen and then to open a TxEd Plus window on the lower half
  1771. of the screen. The same script which opens this window and positions it where
  1772. you wish can also reprogram TxEd Plus' ENTER key to send the file you are
  1773. currently typing to the terminal when you have edited and checked it to your
  1774. heart's content. In fact, with only slightly more work, arrange that hitting the
  1775. ENTER key only send what you typed in since the last time you hit the ENTER key
  1776. to your current place in the file. This gives you the ability to send parts of a
  1777. note, letting the bulletin board know you are still alive, and still have a full
  1778. history of the file you have sent available. This would be an example of   
  1779. modular software  at work, a concept which is being discussed for other
  1780. machines, but is alive and well on the Amiga today.
  1781.  
  1782. At present Amiga TeX , TxEd Plus and VLT all support this kind of
  1783. cooperative AREXX intermediated behavior. This allows you to mix and match
  1784. independent applications to your heart's content under your own control.
  1785.  
  1786. In this section we will first list all of the commands that VLT recognizes and
  1787. then give examples of native and AREXX script files which carry out various
  1788. useful tasks.
  1789.  
  1790.  
  1791.    Commands 
  1792.  
  1793. We first begin by giving a table of those commands which can only be used in
  1794. startup scripts; i.e., files like    s:vlt.init  which are read when VLT
  1795. starts up. The commands which set screen colors require you to specify three
  1796. hexadecimal numbers, each of which ranges from 0 to F (the numbers 0 to 15). The
  1797. first number specifies the amount of red there is in the color you wish to
  1798. create, the second, the amount of green, and the third, the amount of blue; for
  1799. example, 000 means black, F00, bright red, 0F0, bright green, 00F, bright blue,
  1800. and FFF, white. To get a feeling for what colors you get play with the palette
  1801. selector in the    Screen  menu, since it works in exactly the same way.
  1802.  
  1803.   Initialization File Only Commands
  1804.  
  1805.            Name            Argument Values            Function 
  1806.  
  1807.     BACkground           | (e.g. 000, FFF) |  set background color
  1808.     BOLd                 |      "          |  set bold color
  1809.     CURsor               |      "          |  set cursor color
  1810.     DEPth                |      "          |  set screen depth           
  1811.     FOReground           |      "          |  set foreground color
  1812.     COL4                 |      "          |  set color 4               
  1813.     COL5                 |      "          |  set color 5               
  1814.     COL6                 |      "          |  set color 6              
  1815.     COL7                 |      "          |  set color 7                  
  1816.     INTerlace            |  ON/OFF, YES/NO | interlace ON/OFF   
  1817.     SCReen               |  W, C           |  Screen, Workbench/Custom
  1818.     TEK_load             |  ON/OFF, YES/NO |  Preload Tektronix screen
  1819.     WB_colors            |  ON/OFF, YES/NO |  use Workbench colors
  1820.  
  1821. The second set of commands are things which can only be executed from a native
  1822. VLT script (a file which is assumed to have the default extension .s.
  1823. These commands are a part of Dave Wecker's original VT100 program.
  1824. When running an AREXX script a DELay is best accomplished by calling the AmigaDOS
  1825. WAIT command. GOTO is unnecessary since AREXX scripts have very sophisticated
  1826. control structures; however, the ON and WAIT commands do not, at present, have a
  1827. nice way of being called directly from AREXX. EXIT can have no arguments, in
  1828. which case it exits the current script, or it can have the argument VLT, in
  1829. which case it exits VLT. If the argument is the name of another script file,
  1830. VLT will exit the current script and start executing the specified one.
  1831. The command RX will execute an AREXX script. This is, however, not supported
  1832. from within an AREXX script.
  1833.  
  1834.  
  1835.  
  1836.                        Commands Only For VLT Scripts
  1837.  
  1838.            Name            Argument Values            Function 
  1839.  
  1840.     DELay               | integer (seconds)    |   delay number of seconds
  1841.     EXIT                | VLT or script file   |   exit script or VLT
  1842.     GOTo                | "labelname"          |   goto label
  1843.     ON                  | "string" "command"   |  on a 'string' do a command 
  1844.     RX                  | "Rexx command string"|  do a REXX string command  
  1845.     WAIT                | "string"             |   wait for a host string
  1846.  
  1847. The remaining commands can be executed from any AREXX or native VLT script.
  1848. The only new thing that one has to know about here is the symbol ^, which is
  1849. referred to as the keyscript introducer. The keyscript introducer is the
  1850. character which you must put in front of the name of a script file when it is
  1851. programmed into a function key in order that it recognize that this is the name
  1852. of a file to be executed. The list of commands falling into the generally
  1853. available category is given in the tables on the next two pages. There are,
  1854. however, several commands that cannot be used in the initialization file (such
  1855. as all the file transfer commands).
  1856.  
  1857.  
  1858.                    Generally Available Commands
  1859.  
  1860.        Name            Argument Values            Function 
  1861.  
  1862.     APPlication      |  ON/OFF, YES/NO        |  turn app. cursor on/off
  1863.     ASCii_send       | "filename"             |  ascii send a file 
  1864.     BAUd             | integer (300 - 19200)  |  set baud rate         
  1865.     BEEp             | none                   |  beep                 
  1866.     BUFfer           | integer (512 - 2048)   |  set buffer size  
  1867.     BREaktime        | integer (microseconds) |  set break time           
  1868.     BTAb_shift       | ON/OFF, YES/NO         |  shift-tab sends ESC - TAB   
  1869.     CAPture          | "filename"             |  capture to a file     
  1870.     CD               | "new path"             |  change directory       
  1871.     DOWncase         | ON/OFF, YES/NO         |  Kermit: downcase file names
  1872.     ECHo             | ON/OFF, YES/NO         |  turn echo on or off    
  1873.     EMIT             | "string"               |  display line on screen  
  1874.     F                | integer "string"       |  define function key
  1875.     HANdshake        | N, X, 7, W             |  Handshake with serial
  1876.                                                  port None, Xon/xoff, 7-wire,
  1877.                                                  7 + X  
  1878.  
  1879.  
  1880.                      Generally Available Commands
  1881.  
  1882.         Name            Argument Values            Function 
  1883.  
  1884.     HEIght_cursor    | integer (pixels)       |  set cursor height
  1885.     KERmit_flags     | S, H                   |  set kermit flags:  
  1886.                                                  Send/receive, Host is server 
  1887.     KEYscript_char   | hex value (e.g. 7E)    |  keyscript character    
  1888.     KB               | none                   |  kermit bye (for server)
  1889.     KG               | "filename"             |  kermit get file         
  1890.     KMAXPACK         | packet size            |  kermit maximum packet size
  1891.     KR               | none                   |  kermit receive file      
  1892.     KS               | "filename"             |  kermit send file          
  1893.     LFHelp           | ON/OFF, YES/NO         |  help key sends LF      
  1894.     LOCk_graphics    | ON/OFF, YES/NO         |  no tek: lock tek screen  
  1895.     LINes            | integer                |  number of lines        
  1896.     MODe             | N, I, C                |  C = convert cr/lf to lf 
  1897.     MOUse_to_host    | ON/OFF, YES/NO         |  send mouseclicks to host  
  1898.     NUMKEYpad        | ON/OFF, YES/NO         |  turn numeric kpad on/off 
  1899.     PARITY           | N, E, O, M, S          |  set parity, None, Even, Odd,
  1900.                                                  Mark, Space
  1901.     PREScroll        | integer                |  max. number of lines of 
  1902.                                                  prescroll
  1903.     RENDer           |  Q, N, C               |  rendering mode: Quick, 
  1904.                                                  Normal, Color
  1905.     SB               | none                   |  send a break           
  1906.     SD               | integer                |  set ascii-send delay
  1907.     SEND             | "string"               |  send string to host
  1908.     SWAP_bs_del      | ON/OFF, YES/NO         |  Swap BS and DEL
  1909.     VOLume           | integer                |  set volume
  1910.     VPFkeys          | ON/OFF, YES/NO         |  screen (virtual) PF keys
  1911.     WIDth            | integer                |  number of columns
  1912.     WRAP             | ON/OFF, YES/NO         |  turn wrap on or off
  1913.     XFEr_protocol    | X, K, A                |  set transfer protocol
  1914.                                                  XMODEM, Kermit, Ascii
  1915.     XR               | "filename"             |  xmodem receive file 
  1916.     XS               | "filename"             |  xmodem send file
  1917.     XMOdem_flags     | N, 1, C, 1C            |  set xmodem flags: 1 = 
  1918.                                                  1K blocks, C = CRC
  1919.  
  1920.  
  1921.  
  1922.    A Sample Startup Script 
  1923.  
  1924. In the belief that a good example is worth a thousand words we now present an
  1925. example of an  .init  file. If you were to put this file in your current
  1926. directory as    vlt.init  or you were to file it as    s:vlt.init  then it
  1927. would override the defaults specified in    s:VTPrefs.dat  The commands all do
  1928. the same thing that you could do by setting the menu options by hand, except for
  1929. the line    exit script.name  which causes the    .init   file to terminate
  1930. and then run a script file.
  1931.  
  1932. One further point which should be noted is that the character # is used to
  1933. preface a comment in an internal VLT script. Everything which appears on a
  1934. line following the character # is ignored. Also, one types ^@ before the
  1935. name of a script or AREXX file which is to be executed by a programmed function
  1936. key.
  1937.  
  1938.    Sample Initialization File VLT.INIT  
  1939.  
  1940. #     This is a sample initialization file.  
  1941. #     The settings listed here override      
  1942. #     the program's defaults and also the ones read from vtprefs.dat.
  1943. #     These files may be located in the current directory and/or
  1944. #     in s:. The default directory is searched first. 
  1945. # Transfer protocol: Ascii, Kermit, XMODEM  
  1946. BAUD               2400
  1947. # Anything after required fields is ignored 
  1948. BREAK              75000
  1949. # Break time in micro-seconds 
  1950. B TAB_SHIFT        NO
  1951. # Set SHIFT TAB to send ESC TAB. Else just TAB. 
  1952. BUFFER             2048
  1953. # 512  Input buffer size le 2048 
  1954. BACKGROUND         000
  1955. # Colors are in hex RGB from 000 to FFF 
  1956. BOLD               950 
  1957. # Color for bold highlighting (in custom) 
  1958. COL4               D00
  1959. # The RGB setting of color 4 
  1960. COL5               D90
  1961. # The RGB setting of color 5 (color mode bold) 
  1962. COL6               045
  1963. # The   RGB  setting of color 6 
  1964. COL7               999
  1965. # The RGB setting of color 7 (color mode cursor) 
  1966. CURSOR             080
  1967. # Color for cursor (in custom screen) 
  1968. FOREGROUND         078
  1969. # Colors are only used on the custom screen 
  1970. DOWNCASE           YES
  1971. # KERMIT should downcase host names 
  1972. DEPTH              3
  1973. # number of bit planes to use (1 or 2 or 3) 
  1974. ECHO               ON
  1975. # Full duplex mode in use 
  1976. HEIGHT_CURSOR      1
  1977. # Cursor height 
  1978. INTERLACE          ON
  1979. # ON for CUSTOM or interlaced workbench 
  1980. KEYSCRIPT          7E
  1981. # Hex value for script introducer 
  1982. LFHELP_KEY         NO
  1983. # Set HELP key to send LF, else send keypad ',' 
  1984. LINES              35
  1985. # normal le   24 interlaced le 48 
  1986. MODE               IMAGE
  1987. # IMAGE or CRLF (for KERMIT transfers) 
  1988. MOUSE              OFF
  1989. # Mouse events to host on or off 
  1990. NUMKEY             ON
  1991. # The keypad should be numeric 
  1992. PARITY             EVEN
  1993. # NONE (= 8 bit), MARK, SPACE, ODD or EVEN 
  1994. RENDER            Q       
  1995. # Render mode: Quick, Normal or Color 
  1996. SCREEN            CUSTOM
  1997. # may be CUSTOM or WORKBENCH 
  1998. SWAP              OFF     
  1999. # Don't Swap the Back-space and Delete keys 
  2000. TEK_LOAD         NO      
  2001. # Load Tektronix screen and preferences. 
  2002. VOLUME            0       
  2003. # Beep Volume (0 = Visual Beep) 
  2004. VPF_KEYS         ON      
  2005. # PF keys on the screen off or on 
  2006. WBCOLORS          NO      
  2007. # ignore custom colors and use defaults 
  2008. WRAP              OFF     
  2009. # Auto wrap ON or OFF 
  2010. LOCK_GRAPHICS     NO
  2011. # Disable Tektronix graphics 
  2012. XMODEM_FL         C1      
  2013. # XMODEM flags. C is CRC, 1 is 1K blocks 
  2014. KERMIT_FL         S       
  2015. # Kermit flags, H = host is server 
  2016. XFER_PROTOCOL     X    
  2017. # Transfer protocol: Ascii, Kermit, XMODEM 
  2018. WIDTH             100     
  2019. # Number of columns 
  2020. HANDSHAKE         X       
  2021. # N=none, X=Xon/Xoff, 7=7wire, w=7/XonXoff 
  2022. PRESCROLL         8    
  2023. # Max. number of lines of prescroll 
  2024. KMAXPACK          1000    
  2025. # Max. Kermit packet size 
  2026. #    Function bindings (strings to type when any of F1 - F10 are pressed) 
  2027. #   f<num>      = function key  
  2028. #   f<num>+10   = shifted function key 
  2029. #   f<num>+20   = ctrl-ed function key 
  2030. #   f<num>+30   = alt-ed function key 
  2031. #   f<num>+40   = menu items right-Amiga 1 - 0 
  2032. #   f<num>+50   = screen pf gadgets 
  2033. #     
  2034. #    Strings are parsed at the time the corresponding function key is  
  2035. #    activated. Unlike previous versions of the program, this version uses 
  2036. #    standard AmigaDOS (ARP) escape conventions.  This means that the 
  2037. #    byte stored in ArpBase.ESCChar is used to detect the escape values.
  2038. #
  2039. #    This defaults to the undocumented BCPL '*' character,
  2040. #    but the Set command provides users with a method for changing
  2041. #    this default. 
  2042. #    Currently the following special characters are recognized: 
  2043. #      N   -   newline 
  2044. #      T   -   horizontal tab 
  2045. #      V   -   vertical tab 
  2046. #      B   -   backspace 
  2047. #      R   -   return 
  2048. #      F   -   formfeed 
  2049. #      E   -   escape (ascii 27 decimal) 
  2050. #      Xnn -   character representd by   hex value nn. 
  2051. #   
  2052. #    The above may be either upper or lower case.  If an escaped character
  2053. #    which is not one of the above is given,  it will return the character
  2054. #    value (i.e. '* A' will be replaced by the single character 'A'.
  2055. #    The sequence '* *' is replaced by the single character '*',
  2056. #    and so on.) 
  2057. #   
  2058. #    For sending hex codes, the * X argument may be followed by either
  2059. #    one or two hex digits, in either upper or lower case. 
  2060. #  
  2061. #    If the first character of the string is a script introducer (KEYSCRIPT) 
  2062. #    then the string is interpreted as a script item. 
  2063. #    If the next character is a @, the following string will be considered the 
  2064. #    name of a script file.
  2065. #    If the file extension is .vlt or .rexx, the script name will be sent
  2066. #    to the REXX host when the key is pressed. If the extension 
  2067. #    is .scp, the lines in the corresponding file will be executed as VLT
  2068. #    script commands. Otherwise, the string following the script introducer
  2069. #    will be interpreted as a VLT command.  
  2070. #  
  2071. #    Examples of bindings: 
  2072. #  
  2073. #    F 10 "* EOP"  
  2074. #   
  2075. #    means send <escape> O P to host upon pressing F10.
  2076. #  
  2077. #    F 11 " emit 'This is a test'" 
  2078. #  
  2079. #    means send "This is a test" to the VLT screen upon pressing shift-F1. 
  2080. #  
  2081. #    F 22 "^ rx 'send this to rexx'" 
  2082. #   
  2083. #    means send "send this to rexx" to the REXX host as a string command upon 
  2084. #    pressing ctrl-F2 
  2085. #  
  2086. #    F 32 "^ @dialbix.scp" 
  2087. #  
  2088. #    means execute the VLT script "dialbix.scp" upon pressing alt-F2. 
  2089. #  
  2090. #    F 44 "^ @dialwork.rexx" 
  2091. #  
  2092. #    means send "dialwork.rexx" to the REXX host as a command upon pressing 
  2093. #    right-Amiga 4. 
  2094. #  
  2095. #    F 55 "^ send '* EOP'" 
  2096. #  
  2097. #    means send <escape> OP to the host upon clicking the F5 gadget on the 
  2098. #    screen. This is equivalent to example F 10. 
  2099. #  
  2100. f 1       "* EOP" 
  2101. # F1 gives standard VT100 PF1 sequence for VAX and IBM  
  2102. f2        "* EOQ"
  2103. # F2 gives standard VT100 PF2 for VAX and IBM  
  2104. f3        "* EOR"
  2105. # F3 gives standard VT100 PF3 for VAX and IBM  
  2106. f4        "* E4"
  2107. # F4 gives correct VT100 PF4 for IBM should be * EOS for VAX  
  2108. f5        "* E5"
  2109. # F5 gives correct PF5 for IBM, no counterpart on VAX 
  2110. f6        "* E6"
  2111. # F6 gives PF6 on IBM  
  2112. f7        "* E7"
  2113. # F7 gives PF7 on IBM  
  2114. f8        "* E8"
  2115. # F8 gives PF8 on IBM  
  2116. f9        "* E9"
  2117. # F9 gives PF9 on IBM  
  2118. f10      "* E0"
  2119. # F10 gives PF10 on IBM  
  2120. f11      "* E-"
  2121. # (shift)F1 gives PF11 on IBM  
  2122. f12      "* E="
  2123. # (shift)F2 gives PF12 on IBM   
  2124. f13     "* E!"
  2125. # (shift)F3 gives PF13 on IBM   
  2126. f14      "* E@"
  2127. # (shift)F4 gives PF14 on IBM  
  2128. f15      "* E#"
  2129. # (shift)F5 gives PF15 on IBM  
  2130. f16      "* E$"
  2131. # (shift)F6 gives PF16 on IBM  
  2132. f17      "* E%"
  2133. # (shift)F7 gives PF17 on IBM  
  2134. f18      "* E^"
  2135. # (shift)F8 gives PF18 on IBM  
  2136. f19      "* E&"
  2137. # (shift)F9 gives PF19 on IBM  
  2138. f20      "* E* * "
  2139. # (shift)F10 gives PF20 on IBM  
  2140. f21      "* E("
  2141. # (ctrl)F1 gives  PF21 on IBM  
  2142. f22      "* E)"
  2143. # (ctrl)F2 gives PF22 on IBM  
  2144. f23      "* E_"
  2145. # (ctrl)F3 gives PF23 on IBM  
  2146. f24      "* E+"
  2147. # (ctrl)F4 gives PF24 on IBM  
  2148. f...  
  2149. f30     "c10"
  2150. # (ctrl)F10 sends the string "c10"  
  2151. f31     "a1"
  2152. # (alt)F1 sends the string "a1"  
  2153. f...
  2154. f41 &    "m1"
  2155. # (ra 1) sends the string "m1"  
  2156. f...  
  2157. f51     "* EOP"
  2158. # on screen function key PF1  
  2159. f52     "* EOQ"
  2160. # on screen function key PF2  
  2161. f53     "* EOR"
  2162. # on screen function key PF3  
  2163. f54     "* EOw"
  2164. # on screen alternate way of getting PF4 on IBM  
  2165. f55     "* EOx"
  2166. # alternate PF5 on IBM  
  2167. f56     "* EOy"
  2168. # alternate PF6 on IBM  
  2169. f57     "* EOt"
  2170. # alternate PF7 on IBM  
  2171. f58     "* EOu"
  2172. # alternate PF8 on IBM  
  2173. f59     "* EOv"
  2174. # alternate PF9 on IBM  
  2175. f60     "* EOq"
  2176. # alternate PF10 on IBM  
  2177. f61     "* EOr"
  2178. # alternate PF11 on IBM  
  2179. f62     "* EOs"
  2180. # alternate PF12 on IBM  
  2181. f63     "* E!"
  2182. # PF13 on IBM (same as above)  
  2183. f64     "* E@"
  2184. # PF14  
  2185. f65     "* E#"
  2186. # PF15  
  2187. f66     "* E$"
  2188. # PF16  
  2189. f67     "* E%"
  2190. # PF17  
  2191. f68     "* E^"
  2192. # PF18  
  2193. f69     "* E&"
  2194. # PF19  
  2195. f70 &    "* E* *"
  2196. # PF20  
  2197. f71 &    "* E("
  2198. # PF21  
  2199. f72 &    "* E)"
  2200. # PF22  
  2201. f73 &    "* E_"
  2202.  # PF23  
  2203. f74 &    "* E+"
  2204. # PF24  
  2205. f75 &    "* EOS"
  2206. # PA1 on IBM  
  2207. f76 &    "* E* X7F"
  2208. # EOL (erase to end of line) on IBM  
  2209. f77 &    "* EOn"
  2210. # INS (insert key which stays lit to show insert
  2211. mode) on IBM  
  2212. f78 &    "* EOl"
  2213. # TRQ (test request, brings back last command) on
  2214. IBM  
  2215. f79 &    "* R"
  2216. # RET (Carriage return)  
  2217. f80 &    "* EOM"
  2218. # CLR (clear screen) 
  2219. #  
  2220. #   all done with init, now execute script as startup sequence 
  2221. #  
  2222. #    exit df1:vt100_source/dialwork.scp 
  2223.  
  2224. The preceding script was an example of a native VLT initialization script.
  2225. Other native scripts are written in exactly the same way and can be executed
  2226. either from a preceding script, or from the    Macros  menu by choosing the
  2227. VLT script  option. In the remainder of this chapter we will be more
  2228. interested in giving examples of the way in which VLT 's AREXX interface can be
  2229. used to write much more powerful interactive scripts.
  2230.  
  2231. There are two sorts of AREXX scripts which can be written and they behave
  2232. slightly differently. In general, if you have an AREXX macro it will have an
  2233. extension of the form    .rexx . If you wish to send a command to VLT then
  2234. you preface it with the
  2235.  
  2236.    ADDRESS VLT 
  2237.  
  2238. string, as is explained in the AREXX manual; where in this case, VLT is the name
  2239. of the message port that VLT opens when it is running. Hence if you wish an
  2240. asynchronously running AREXX macro (say running in the editor) to tell VLT to
  2241. send a string to the mainframe all you have to do is include the line
  2242.  
  2243.    ADDRESS VLT SEND "string" 
  2244.  
  2245. in your AREXX macro.
  2246. In addition to the general sort of AREXX macro there are special VLT macros;
  2247. these are the ones with file extension    .vlt . If you write a macro of this
  2248. type then you never have to type
  2249.  
  2250.    ADDRESS VLT 
  2251.  
  2252. because AREXX will assume that any command that it does not recognize is a VLT
  2253. command and pass it on to the program. In this case, however, any command you
  2254. wish to pass to the Amiga WSHell or CLI environment will need to be prefaced by
  2255. the command
  2256.  
  2257.    ADDRESS COMMAND 
  2258.  
  2259. The next example shows how the AREXX macro rexx:Amiga_to_IBM.vlt  works.
  2260. Note, this macro first opens the special AREXX support libraries discussed
  2261. earlier so that it can call the functions    postmsg ,    getfile  and   
  2262. request . The documentation for these functions is provided on the distribution
  2263. disk. It can also be found on the SLAC VM Amiga disk.
  2264.  
  2265.    An Example of a .vlt  Script
  2266.  
  2267. /* this is a test for a window which pulls stuff */
  2268. check = addlib('rexxsupport.library',0,-30)  
  2269. check = addlib('rexxarplib.library',0,-30)  
  2270. check = addlib('rexxmathlib.library',0,-30) 
  2271.  
  2272. host = address()
  2273.  
  2274. ft = 'temp'
  2275. fm = 'a'
  2276.  
  2277.     msgstring =            "   This routine sends a file to    "
  2278.     msgstring = msgstring||"   the IBM mainframe.  To select   "
  2279.     msgstring = msgstring||"   a file to send simply use the   "
  2280.     msgstring = msgstring||"   file requestor up above.        "
  2281.     msgstring = msgstring||"   If you hit CANCEL the transfer  "
  2282.     msgstring = msgstring||"   terminates.  The same happens   "
  2283.     msgstring = msgstring||"   if you fail to choose anything  "
  2284.     msgstring = msgstring||"   and hit OK.                   "
  2285.  
  2286.     y = postmsg(326,178,msgstring,host)
  2287. done = 0
  2288. do outer = 1 until done = 1
  2289.  
  2290.  
  2291.   filerep = getfile(326,56,,,"CLICK DIRECTORY AND/OR FILE",host)
  2292. /* this checks to see that not everything is blank. */
  2293.  
  2294.   if filerep = '' then do
  2295.       x=postmsg()
  2296.       exit
  2297.   end
  2298.  
  2299. /* here we check to see that we got a file and not just a directory */
  2300.  
  2301.   dircheck = statef(filerep)
  2302.   dirnum = index(dircheck,"DIR")
  2303.   if dirnum ~= 0 then do
  2304.     msgstring =            "   The name of the file itself "
  2305.     msgstring = msgstring||"   should appear in the lower  "
  2306.     msgstring = msgstring||"              box.             "
  2307.     msgstring = msgstring||"                               "
  2308.     msgstring = msgstring||"           TRY AGAIN           "
  2309.     msgstring = msgstring||"     (click left mouse button) "
  2310.    
  2311.     y = postmsg(,,msgstring,host)
  2312.     iterate outer
  2313.   end
  2314.  
  2315.     x=postmsg()
  2316.  
  2317.     parse var filerep dir ":" filerep
  2318.     if filerep = "" then do
  2319.      filerep = dir
  2320.      dir = ":"
  2321.     end 
  2322.     else dir = dir":"
  2323.     filerep = reverse(filerep)
  2324.     parse var filerep filename "/" subdir
  2325.     filename = reverse(filename)
  2326.      
  2327.     sendfile = dir||reverse(filerep)
  2328.     
  2329.     parse var filename xfn"."xft
  2330.     if xft ~= "" then ft = xft
  2331.  
  2332.     
  2333. fillstring = ""
  2334.   fillstring = fillstring||"What do you wish it to be called"
  2335.   fillstring = fillstring||"on the main frame?"
  2336.   fillstring = fillstring||"The name shown below is the default"
  2337.   fillstring = fillstring||"To assign your own name type over it"
  2338.  
  2339. defaultname = xfn" "ft" a"
  2340.  
  2341. ibmname = request(326,56,fillstring,defaultname,"Send It","Cancel",host)
  2342.  
  2343. if ibmname = "" then exit
  2344.  
  2345. if ibmname ~= defaultname then do
  2346.  
  2347.   parse var ibmname ifn ift ifm
  2348.   
  2349.   select
  2350.   
  2351.     when ifn  = '' then ibmname = fn" "ft" "fm
  2352.     when ifn ~= '' & ift = '' then ibmname = ifn" "ft" "fm
  2353.     when ift ~= '' & ifm = '' then ibmname = ifn" "ift" "fm
  2354.     otherwise ibmname = ifn" "ift" "ifm
  2355.  
  2356.   end 
  2357.  
  2358. end
  2359. if host ~= "VLT" then x = screentofront("VLT")
  2360.  
  2361. if host ~= "VLT" then address VLT
  2362.  
  2363.        sendstring = "kermver4 receive "||ibmname" *R"
  2364.        sendstring = '"'||sendstring||'"'
  2365.  
  2366.         SEND "*R"
  2367.         call delay 100
  2368.  
  2369.         SEND "*X7"
  2370.         call delay 50
  2371.  
  2372.         SEND "*R"
  2373.         call delay 50
  2374.         SEND "*R"
  2375.  
  2376.  
  2377.         SEND sendstring
  2378.         
  2379.         call delay 100
  2380.  
  2381.         KS sendfile 
  2382.  
  2383.  
  2384.         SEND "*R"
  2385.  
  2386.         call delay 50
  2387.  
  2388.         SEND "*R*R"
  2389.  
  2390.         call delay 50
  2391.  
  2392.         SEND "*R"
  2393.  
  2394.         SEND "*R"
  2395.  
  2396.         SEND "*N"       
  2397.  
  2398.     done = 1
  2399.  
  2400. end
  2401.  
  2402. if host ~= "VLT" then x = screentoback("VLT")
  2403. exit
  2404.  
  2405. ERROR:
  2406.  
  2407.    say "There has been an error somewhere "
  2408.    exit 20
  2409.  
  2410. SYNTAX:
  2411.    say "Syntax error"
  2412.    exit 20
  2413.  
  2414.  
  2415. NOVALUE:
  2416.    say "Novalue error"
  2417.    exit 20
  2418.  
  2419. HALT:
  2420.  
  2421.    say "External Halt detected"
  2422.    exit 20
  2423.  
  2424. BREAK:
  2425.  
  2426.   say "Control C detected"
  2427.   exit 20
  2428.  
  2429.  
  2430.  
  2431. Finally we close with an example of an AREXX macro which is designed to work
  2432. from withing TxEd Plus and send a file to VLT if it is running. It checks to
  2433. see if VLT is around and puts up an error message and exits if it is not
  2434. around. Of course, it could equally well start it up.
  2435.  
  2436.  
  2437.  
  2438. /*  this file will let you use TxEd Plus as a terminal command line * /
  2439. /*  if you assign the enter key to execute the file asend.txed       * /
  2440. /*  to do this put the line -- MACRO E asend -- in your startup.txed * /
  2441.  
  2442. sendfile = "vd0:asciitempfile" 
  2443.  
  2444. OPTIONS results 
  2445. lastline = 0 
  2446. lastcol = 0  
  2447.  
  2448.   STATUS R XXXXXXXXXXXXX& 
  2449.   INSERT * X20                      /*  insert an extra space for cut/p*e * / 
  2450.   STATUS R                          /*  find out where the cursor is * / 
  2451.   parse var result newline  newcol  /*  parse result to line and column * / 
  2452.   JUMP lastline lastcol             /*  go to lastline first column */  
  2453.   MARK                              /*  start a cut/p*e block * / 
  2454.   JUMP newline newcol+1             /*  mark the block * / 
  2455.   COPY MX                           /*  cut the block to a temp. buffer * / 
  2456.   lastline = newline              
  2457.   lastcol = newcol+1               
  2458.        
  2459.   STATUS MX                         /*  get what is in the X buffer */ 
  2460.   string = result     
  2461.   x = open("ATEMP",sendfile,"W")    /*  open a file to send * /  
  2462.   x = writeln("ATEMP",string)       /*  put the string in the file * / 
  2463.   call close("ATEMP")               /*  close the file * /  
  2464.   address VLT                       /*  send all remaining commands to VLTC */ 
  2465.   ASCII_SEND sendfile               /*  send the file * /  
  2466.   exit  
  2467.  
  2468.  
  2469.    Programming Function Keys 
  2470.  
  2471. All of the commands which are generally accessible from an AREXX exec
  2472. can also be executed from any one of the 80 programmable function
  2473. keys.  See the .init  script for an example of this sort of thing.
  2474.  
  2475.  
  2476.  
  2477.          Appendix I 
  2478.  
  2479.    Introduction 
  2480.  
  2481. VLT recognizes a subset of the standard VT100-style escape sequences when in
  2482. VT100 mode. Some of them, however, are handled in a somewhat different way. In
  2483. addition, there are some additional sequences that a regular VT100 does not
  2484. recognize. The differences and additions are listed in this appendix.
  2485.  
  2486.    Tektronix-emulation related sequences 
  2487.  
  2488. The following two sequences switch between VT100 and Tektronix
  2489. emulation modes.
  2490.   
  2491.   XXXXXXXXXXX
  2492.  
  2493.   ESC   FF      Switches to Tektronix emulation and clears the Tektronix
  2494.                       screen. 
  2495.   CSI   38      Switches to Tektronix emulation without clearing the
  2496.                       Tektronix screen. 
  2497.   CSI   38      Switches back to VT100 emulation. 
  2498.  
  2499. Here,  CSI  is the sequence  ESC  [ .
  2500.   
  2501.  
  2502. In Extended emulation mode some single character sequences are recognized that
  2503. switch to Tektronix emulation:  US ,  GS , and  FS . A sequence
  2504. that switches to VT100 mode is  CAN . For more details see Appendix III.
  2505.  
  2506. One other graphics related sequence is recognized:  ESC #!0 . This is a
  2507. request for a report on which emulation mode VLT is currently in. The response
  2508. to this report is a sequence of 6 characters: %!001 CR  if the current mode
  2509. is VT100, and %!000 CR  if the current mode is Tektronix.
  2510.  
  2511.    Differences for standard VT100 sequences 
  2512.  
  2513. In the case of a regular VT100, the sequences  CSI 1p and CSI 0p switch
  2514. one of the keyboard LEDs on and off.
  2515.  
  2516. Since the Amiga does not have a set of keyboard LEDs, this function switches
  2517. the highlighting status of the  INS  gadget on the screen on or off, if
  2518. the gadgets are currently displayed.
  2519.  
  2520. The sequences  CSI  P_0; ...; P_n m are used on VT100's to change the 
  2521. current mode of graphic rendition.  However, if the
  2522. Color  option of the  Rendition  menu item is selected, the
  2523. various renditions will be mapped to the colors 1 through 5 of the
  2524. current palette of the screen.
  2525.  
  2526. It is recommended that a 3-bitplane custom screen be used in this mode,
  2527. although this works with a Workbench window as well (though some color
  2528. information is lost).
  2529.  
  2530. The assignments are as follows:
  2531.   
  2532.   P_n       Normal operation:         Color mode operation: 
  2533.  
  2534.    0     Normal attributes                 Use color 1 
  2535.    4     Underlined                        Use color 2 
  2536.    1     Bold                              Use color 3 
  2537.    7     Reverse video                     Use color 4 
  2538.    5     Italic                            Use color 5 
  2539.   
  2540. In addition, some ANSI style color sequences are recognized, see section 3.
  2541.  
  2542.  
  2543.  
  2544.    Additional sequences 
  2545.  
  2546. Some additional sequences of the type  CSI  P_0; ...; P_n  P_m are recognized.
  2547. They affect only the color selection for text display and work  only if the 
  2548. Color  option of the  Rendition  menu item is selected.
  2549.  
  2550. The following values of P_n are recognized:
  2551.   
  2552.   P_n           Color mode operation effect: 
  2553.  
  2554.   30            Change to color 0 (background) 
  2555.   31            Change to color 1 
  2556.   32            Change to color 2 
  2557.   33            Change to color 3 
  2558.   34            Change to color 4 
  2559.   35            Change to color 5 
  2560.   36            Change to color 6 
  2561.   37            Change to color 7 
  2562.   40            Set normal rendition, color 1, restore saved mode, erase screen 
  2563.   41            Set normal rendition, color 1, save mode, set color mode on 
  2564.   
  2565. The latter two sequences allow one to use the terminal normally in  Quick 
  2566. rendition mode, but to temporarily switch to  Color rendition and later
  2567. back to the saved settings.
  2568.  
  2569. These two sequences are not ANSI compatible.
  2570.  
  2571. Finally, there is an escape sequence to set the number of lines on
  2572. the screen.
  2573.  
  2574. For compatibility reasons with other terminals, this sequence has the
  2575. form  CSI P_1; P_2; P_; P_4 P, where only P_4 is significant: it is
  2576. the number of lines that the screen should be set to.
  2577.  
  2578. The screen contents are erased by this process.
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.          Appendix II 
  2588.  -30pt
  2589.           Tektronix Emulation 
  2590.  
  2591.    Introduction 
  2592. This appendix briefly describes the Tektronix  4010/14 Graphics Emulator
  2593. implemen-ted in VLT and serves as a User's Guide.  The current implementation
  2594. features almost full Tektronix 4010/14 emulation as found, for example, in
  2595. the DEC VT240 terminal.
  2596.  
  2597. In addition to alpha and vector graphics modes, also point-plot
  2598. and incremental plot modes are supported as well as an extended graphics mode.
  2599. Vectors can be light or dark. Light vectors can have normal or high intensity
  2600. and a full set of patterns is provided.
  2601.  
  2602. The Emulator supports the extended variable-length vector-mode protocol of 
  2603. the Tektronix 4014 and 4100 series of terminals for a maximum resolution of
  2604. 4096 times 4096 pixels.  This version includes support for color: the number of
  2605. colors may be set through a menu option, the colors may be adjusted using a
  2606. requester, and Tektronix 4105 style escape sequences for host-control of
  2607. colors and line styles are recognized.
  2608.  
  2609. The Emulator has a fully functional Graphic INput (GIN) mode and the cross-
  2610. hair cursor can be operated with the mouse or the arrow keys.  Optionally,
  2611. the current position of the graphic cursor is displayed numerically.
  2612. Other options for GIN mode include the standard end-of-report sequences and the
  2613. extended (5 byte) report of the Tektronix 4100 series of terminals.
  2614. These settings, as well as the character sent as part of the GIN report when
  2615. the mouse select button is pressed may be entered through the  Preferences  
  2616. requester.
  2617.  
  2618. Pictures are captured and can be saved to  disk and reviewed later.  The zoom
  2619. and pan features allow enlargement of any part of the screen while retaining
  2620. the full resolution inherent to the graphics primitives sent to the
  2621. terminal.
  2622.  
  2623. This appendix, the User's Manual, describes the operation of the Graphics
  2624. Emulator from the user's point of view. Descriptions are given of all menu
  2625. options and requesters as well as the various modes of operation.
  2626.  
  2627. The next Appendix contains a Programmer's Manual that lists all command
  2628. sequences that can be given from the host and to which the Graphics
  2629. Emulator will respond.
  2630.  
  2631.  
  2632.    VLT's modes 
  2633.  
  2634. VLT has two ``supermodes'': Alphanumeric and Graphic. In Alphanumeric
  2635. supermode the program behaves as a VT100 ASCII terminal, in Graphic
  2636. supermode the program emulates a Tektronix graphics terminal. Each
  2637. supermode has a separate associated window such that the display in one
  2638. does not affect the text in the other. When the terminal is in
  2639. Alphanumeric supermode, the window usually contains text and the
  2640. program responds to standard VT100 escape sequences.
  2641. The Alphanumeric supermode (VT100 mode) is described elsewhere.
  2642. In Graphic supermode the associated window usually contains graphical
  2643. displays, and the program responds to Tektronix 4010/14 control sequences.
  2644.  
  2645. The terminal supermode can be set to  Alpha-Numeric  or  Graphic 
  2646. by selecting the appropriate item from the  Control  and Graphics
  2647. menus respectively. On start-up, the terminal supermode is Alphanumeric. 
  2648. One may also switch between supermodes from the keyboard by pressing the
  2649. right Amiga key (RA) and the letter F simultaneously (in the following
  2650. this will be abbreviated as RA-F).
  2651.  
  2652. In Graphic supermode the program can be in any of five modes: alpha
  2653. mode, vector mode, point-plot mode, incremental plot mode and Graphic
  2654. INput (GIN) mode.
  2655. In alpha mode the program behaves as a dumb ASCII terminal and allows the
  2656. display of alphanumeric text. (Notice, that this mode is not the same as
  2657. the VT100 Alphanumeric supermode!).
  2658.  
  2659. In vector mode the program interprets incoming data from the serial
  2660. port as  x,y  coordinates of vectors and moves the ``pen'' to the
  2661. location x, y (when the pen is up) or draws a line from the current
  2662. position to x, y (when the pen is down). Point-plot mode (sometimes
  2663. called marker mode) operates the same as vector mode, with the
  2664. exception that all incoming  x,y  coordinates are marked on the
  2665. screen by a dot.
  2666.  
  2667. In incremental plot mode incoming data are interpreted
  2668. as single pixel movements of the pen in any of the 8 possible
  2669. directions.  A line is drawn or continued if the pen is currently down
  2670. and a move is executed if the pen is currently up.
  2671.  
  2672. In GIN mode, a graphic cursor (cross hair) is displayed and a bypass
  2673. mode is entered: all keyboard keys are intercepted by the program.
  2674. During  GIN mode the graphic cursor can be moved with the mouse or the
  2675. arrow keys. GIN mode can only be exited by typing an alphanumeric
  2676. character or by pressing the select button of the mouse.
  2677.  
  2678. A report is then sent to the host consisting of the character that was
  2679. typed (or, in case the left mouse button was pressed, its currently selected
  2680. character) and the current  x,y  position of the graphic cursor,
  2681. followed by an end-of-report sequence.
  2682.  
  2683. For more information on these modes and the control and escape
  2684. sequences that need to be sent from the host, see the Programmer's
  2685. Manual. The rest of this manual describes the menus and their function.
  2686. All menu options can be selected from the menu bar of the Graphics
  2687. Window.
  2688.  
  2689. In the following sections, the menus and requesters of the Graphics
  2690. Window will be discussed.
  2691.  
  2692.    The Image menu 
  2693.  
  2694. Incoming data are interpreted as Tektronix 4010/14 control sequences
  2695. and normally stored in a vector format as a temporary binary file on the ram:
  2696. disk. If you would prefer the file to go somewhere else, you may want
  2697. to assign the logical name TekStore: to a directory destination on your floppy
  2698. or hard disk. This is useful if you have a limited amount of memory.
  2699. Once a picture is displayed, it can be copied to a more permanent
  2700. file on disk by selecting the  Save To New File  option from the
  2701.  Image  menu. A file requester will appear, to allow one to specify
  2702. the file name of the file to be created.
  2703.  
  2704. One may overwrite this file with another image by selecting the
  2705. Save To Current File  option. This option may be abbreviated via
  2706. the keyboard as RA-S.
  2707.  
  2708. In order to review pictures that were previously recorded to disk
  2709. select the  Load From Archive  menu option or press RA-L.
  2710. A requester will appear for the file name of the file to be viewed.
  2711. The picture will then be displayed; of course, the zoom and pan feature of
  2712. the Graphics Emulator can be used (see section 2).
  2713. The last picture that was captured before loading from the archive is still
  2714. available,  and will be redisplayed by selecting  Quit Archive  or pressing
  2715. RA-Q. This option must also be used to resume normal operation as a
  2716. Tektronix terminal emulator.
  2717.  
  2718. Pictures are stored in an internal compressed format that preserves the
  2719. vector information of the original image.
  2720.  
  2721. To facilitate transfer of such pictures to other computers, only 7 bits
  2722. are used of each byte in the file, leaving the eighth bit for parity
  2723. information where such is needed.
  2724.  
  2725.    The Zoom/Pan menu 
  2726.  
  2727. To zoom in on a particular portion of the screen, select the  Select
  2728. Zoom Area  item from the  Zoom/Pan  menu or press RA-Z.  Then move
  2729. the mouse to a corner of the part of the screen to be enlarged, press
  2730. the left mouse button and move the mouse to the corner diagonally
  2731. opposite the first, while keeping the left mouse button depressed.
  2732. During this operation a box indicating the selected part of the screen
  2733. will be displayed.  When you have finished the selection, release the
  2734. left mouse button, and the image will be rescaled such that the
  2735. selected part will fill the screen.  Since the proper aspect ratio will
  2736. be preserved, a somewhat larger part of the image may be displayed than
  2737. was selected. Especially for images with considerable detail the
  2738. redrawing process may take a few seconds.
  2739.  
  2740. The screen will flash when the redrawing process is completed.
  2741. The zooming process may be repeated recursively, going to finer and finer
  2742. detail.  Obviously, the resolution that can be obtained depends on the 
  2743. resolution with which the original data were drawn by the host, and is in
  2744. any case never better than 4096 pixels vertically and 4096 pixels horizontally.
  2745. Notice, that the Select Zoom Area  option can be activated even when no
  2746. image is currently present.
  2747.  
  2748. Once the zoom feature has taken effect, one may wish to slide the
  2749. viewpoint to an adjacent part of the picture.  This is called `panning'.
  2750. Select the  Select Pan Area  option or press RA-P to accomplish
  2751. this. Then move the mouse to a point away from the direction you want
  2752. to pan to, press the left mouse button and move the mouse in the
  2753. direction you want to pan to while keeping the left mouse button
  2754. depressed. During this operation a box indicating the new `window
  2755. position' will be displayed.  When you have selected the new area to be
  2756. displayed, release the left mouse button and the image will be
  2757. redisplayed at that position. This operation may take a few seconds
  2758. since the entire picture needs to be redrawn.  The screen will flash
  2759. when the redrawing process is completed.  One may pan repeatedly, or
  2760. alternate panning and zooming operations.  In the un-zoomed state, a 
  2761. 780 times 1024 (or 3120 times 4096) pixel area will normally be
  2762. visible. Panning upwards will allow you to see the part of the screen
  2763. that is usually obscured.
  2764.  
  2765. To reset the zoom/pan feature to display the full image, select the
  2766. Reset Zoom/Pan  item or press RA-R.
  2767.  
  2768.    The Cursor menu 
  2769.  
  2770. Normally, the graphic cursor is only displayed when the host sends the
  2771. enter-GIN-mode command.  It should almost never be necessary to enter
  2772. Graphic INput (GIN) mode from the terminal, but the possibility is
  2773. provided as a menu option.   This option should be used with care,
  2774. however, since it alters the behaviour of the program considerably.
  2775.  
  2776. To enter GIN mode from the terminal, select the  Switch Graphic
  2777. Cursor On  option from the  Cursor  menu.  To exit it in a way that
  2778. is transparent to the host, select the  Switch Graphic Cursor Off 
  2779. item. 
  2780.  
  2781. If during GIN mode any alphanumeric key is pressed on the
  2782. keyboard, that character is sent to the host along with a GIN report.
  2783. During GIN mode the graphic cursor (cross hair) can be moved using
  2784. either the mouse, or the arrow keys on the keyboard.
  2785.  
  2786. When the arrow keys are used in combination with the shift key, the graphic
  2787. cursor moves with coarse steps, otherwise the step size is one (Amiga) pixel.
  2788. Notice, that the mouse has priority over the keypad: if the keypad is
  2789. used, any subsequent movement of the mouse will cause the graphic
  2790. cursor to jump back to mouse control.
  2791.  
  2792. The current position of the graphic cursor can be displayed numerically
  2793. in the top left hand corner of the screen by selecting the  Display
  2794. Cross Hair + XY  item of the  Cursor  menu or by pressing RA-N.
  2795. Numeric display is turned off by selecting the  Display Cross Hair
  2796. Only  item or pressing RA-H.  Together with the possibility of turning
  2797. GIN mode on and off transparently to the host, this option can be used
  2798. to measure the size of objects on the screen in the coordinates of the
  2799. original picture (either 1024  times  1024 or 4096  times  4096
  2800. pixels, see also the section on    reports to the host ).
  2801.  
  2802. The default settings for this menu are  Switch Graphic Cursor Off 
  2803. and  Display Cross Hair Only .
  2804.  
  2805.    The Screen Menu 
  2806.  
  2807. The  Screen  menu contains several controls to select the attributes
  2808. of the Tektronix Graphics screen and window.
  2809.  
  2810. The  Clear Screen  option will erase any text and graphics currently
  2811. being displayed. This option can also be invoked by pressing RA-C.
  2812.  
  2813. The entire VT100/Tektronix emulator can be moved behind other
  2814. applications by selecting the  Screen To Back  option (RA-J).
  2815. Note that you can only resume the terminal session by
  2816. moving the screens back to the front, either using something like
  2817. FunKeys (from MicroSmiths) or by pressing the left Amiga key together
  2818. with the N or M keys. Make sure you return to the currently active
  2819. window, be it Graphics or Alphanumeric.
  2820.  
  2821. The Tektronix window may be on a custom screen or on the Workbench,
  2822. selectable through the sub-items  Custom Screen  and  Workbench 
  2823. of the  Select Screen Type  option.
  2824.  
  2825. In case the current screen is a custom screen, it may be selected to be
  2826. Interlaced  or  Non-Interlaced . If the screen is a Workbench screen 
  2827. the interlace setting of the Workbench is used.
  2828.  
  2829. The number of colors to be used for the screen may be selected through
  2830. sub-items of the  Select No. Of Colors  item. Either 2, 4, 8 or 16
  2831. colors may be selected.
  2832.  
  2833. Notice, that drawing speed decreases noticably with 16 colors. When the
  2834. Graphics window is on the Workbench, only 4 colors are available and 
  2835. selecting other settings will have no effect.
  2836.  
  2837. The colors may be adjusted using a color requester that appears when
  2838. the  Select Colors  item is selected. Any color can be modified by
  2839. clicking on the gadget of that color in the color requester and sliding
  2840. the three color sliders (Red, Green and Blue) until the desired color
  2841. is reached.
  2842.  
  2843. When all colors have been adjusted, clicking the  OK gadget will cause
  2844. these colors to remain in effect while exiting the color requester.
  2845. Clicking on the  Reset  gadget will cause the original colors to reappear.
  2846. The  Cancel  gadget has the same effect as  Reset , but will also exit
  2847. the color requester. Note, that one cannot change colors if the Graphics
  2848. window is on the Workbench.
  2849.  
  2850. The graphics window and/or screen may be closed entirely (to save memory, for
  2851. example) by selecting the  Close Screen  option.
  2852.  
  2853. All screen attributes may be saved to disk by selecting the  Save 
  2854. gadget in the  Preferences  requester.
  2855.  
  2856.    The Control Menu 
  2857.  
  2858. The  Control  menu contains two options. To return to the Alphanumeric screen,
  2859. select the  Return To Alpha-Numeric  option or press RA-F.
  2860.  
  2861. Various options associated with the Tektronix emulation can be selected
  2862. from the  Preferences  requester that will appear when the  Set
  2863. Preferences  option is selected. This requester is described in section
  2864. 6.
  2865.  
  2866.    The Preferences Requester 
  2867.  
  2868. When the  Set Preferences  menu option is selected from the
  2869. Control  menu, a requester will appear on the screen allowing the
  2870. user to set several default options. These settings can be saved to a
  2871. file, and will be automatically loaded on the next invocation of the
  2872. communications program. The requester is divided in several areas, each
  2873. with several selectable gadgets. The possible settings are described in
  2874. the following sub-sections.
  2875.  
  2876. In order to determine which options work best with the application you
  2877. are running on the host, consult your local system manager or use the
  2878. method of trial and error.
  2879.  
  2880.     Emulation Options  
  2881.  
  2882. In Graphic supermode the program conforms as closely as possible to the
  2883. Tektronix 4010/14 standard by selecting the  Plain 4010/14  gadget
  2884. of the  Emulation Options  area. In this case, the host can send
  2885. only three particular escape sequences to switch the terminal between
  2886. Graphic and Alphanumeric supermodes, and dark vectors are not
  2887. supported. Also, a carriage return character sent from the host causes
  2888. escape from vector mode to alpha mode, whereas in Extended mode it is
  2889. ignored.
  2890.  
  2891. If the  Extended  gadget is selected, some graphics control
  2892. sequences are recognized both in Alphanumeric supermode and in Graphic
  2893. supermode, allowing a more flexible switching between the two
  2894. supermodes. Also, some four-byte escape sequences are recognized while
  2895. in graphic mode that allow the support of a.o. dark vectors and color.
  2896. This is the default and recommended mode of operation, unless your
  2897. system generates control sequences in Alphanumeric mode that cause
  2898. interference.
  2899.  
  2900. The gadget labeled  Amiga  is not currently implemented and is
  2901. disabled.
  2902.  
  2903.     Cursor Report Options  
  2904.  
  2905. In Graphic INput (GIN) mode, the graphic cursor is displayed. After
  2906. moving the graphic cursor to the desired position, GIN mode is
  2907. terminated by pressing a key on the keyboard or the left mouse button.
  2908. A GIN report is then sent to the host consisting of the character that
  2909. was entered (or a selectable character in case the left mouse button
  2910. was pressed), the current  x,y  coordinates of the graphic cursor,
  2911. and the end-of-report sequence that is currently selected.
  2912.  
  2913. The  Cursor Report Options  area allows various properties of the
  2914. GIN report to be set. The GIN report can be terminated in three
  2915. different ways: these are what in Tektronix terminology are called the
  2916. `strappable options'. By default, GIN reports are terminated by a
  2917.  CR  character (the ASCII character for Carriage Return, decimal 13
  2918. or  ctrl  M), accessible by selecting the  End with CR  gadget.
  2919. GIN reports are terminated by a sequence of  CR  and  EOT  (the
  2920. ASCII character signifying End Of Tape, decimal 4, or  ctrl  D)
  2921. characters when the  End with CR/EOT  gadget is selected. GIN
  2922. reports are not terminated at all when the  Use No Ending  gadget is
  2923. selected.
  2924.  
  2925. The Graphics Emulator supports some Tektronix 4100 series
  2926. characteristics. One of them is the capability of sending extended (5
  2927. byte) GIN reports. This option is selected using the  Use Extended
  2928. Report  gadget of the  Cursor Report Options  area. The default is,
  2929. however, the standard (4 byte) GIN report expected by Tektronix 4010/14
  2930. compatible application programs running on your host. If the  Use
  2931. Extended Report  gadget is selected, the numerical graphic cursor
  2932. display (see section 3) will use a 4096 by 4096 pixel coordinate
  2933. system, otherwise the coordinate system will default to 1024 by 1024
  2934. pixels.
  2935.  
  2936.     Incremental Mode Options 
  2937.  
  2938. Incremental Mode is the graphics mode in which incoming data are
  2939. interpreted as single-pixel movements in any of the 8 possible
  2940. directions. Since this Graphics Emulator supports both 1024  times 
  2941. 1024 and 4096  times  4096 pixel resolutions, the step size for
  2942. single-pixel movement needs to be selectable. If the application you
  2943. are using on the host sends data assuming a standard Tektronix 4010/14
  2944. compatible terminal, select the  Step = 1/1024  gadget from the
  2945. Incremental Mode Options  area, otherwise select the  Step =
  2946. 1/4096  gadget (default).
  2947.  
  2948.     Adjust Display Size  
  2949.  
  2950. The  Adjust Display Size  area allows you to change the horizontal
  2951. and vertical extent of the display area used for Tektronix graphics.
  2952. This is mainly useful to adjust the display size to other parameters of
  2953. your system, or to correct a faulty aspect ratio.
  2954.  
  2955. The number for the horizontal size corresponds to the number of Amiga
  2956. pixels the Emulator will use for the horizontal extent of the Tektronix
  2957. screen. The number for the vertical size corresponds to the number of
  2958. pixels used on the Amiga for the vertical extent. The number is
  2959. internally multiplied by 2 in case you use an interlaced display and
  2960. the value that appears in the requester is therefore independent of
  2961. interlace.
  2962.  
  2963. Notice, that if the file  TekPrefs.dat  cannot be found either in
  2964. the system's s: directory nor in the current default directory, these
  2965. numbers will be set to the ones currently in effect for the screen (see
  2966. also the section on    reports to the host ).
  2967.  
  2968.     Mouse Character  
  2969.  
  2970. The character sent as part of the GIN report when the left mouse button
  2971. is pressed can be chosen by selecting the  Mouse Character  gadget
  2972. and typing the desired character. The default character is the
  2973.  ESC  character (the ASCII Escape character, decimal 27, or
  2974.  ctrl  [).
  2975.  
  2976.     Reset, Cancel, Use, Save  
  2977.  
  2978. After changing the settings, you can use them and return to the
  2979. Emulator by selecting the  Use  gadget. You can also save the
  2980. current set of preferences by selecting the  Save  gadget: the
  2981. preferences will be saved to a file called  TekPrefs.dat , which
  2982. will be saved either in the current default directory (if no such file
  2983. exists yet, or if a  TekPrefs.dat 
  2984.  is already present
  2985. in that directory) or in the s: directory (if a  TekPrefs.dat  file is found
  2986. there, but not in the current default directory).
  2987.  
  2988. If you decide you don't like the preferences you have just set, you can
  2989. return to the Emulator with the old preferences by selecting the
  2990.  Cancel  gadget. If you want to change the preferences but want to
  2991. start over from the previously saved ones, you can click on the
  2992.  Reset  gadget. Clicking on the  Reset  gadget a second time
  2993. causes the preferences to be reset to the `factory' settings.
  2994. Subsequent selections of the  Reset  gadget toggle between the last
  2995. saved and the factory settings.
  2996.  
  2997.     The current version number  
  2998.  
  2999. The current version number of the graphics package can be determined by
  3000. displaying the menu bar using the right mouse button. The only menu is
  3001. the  Version  menu. It contains the version number.
  3002.  
  3003.  
  3004.  
  3005.  
  3006.          Appendix III 
  3007.          Tektronix Programmer's Manual 
  3008.  
  3009.    Introduction  
  3010.  
  3011. This appendix describes the command sequences that the Tektronix
  3012. 4010/14 Graphics Emulator will respond to when they are received from
  3013. the host. In the first section the sequences are described that change
  3014. the supermode. The following sections describe the sequences that are
  3015. recognized in alpha mode, vector and point-plot mode, incremental plot
  3016. mode and GIN mode. A section follows describing the various reports to
  3017. the host. The manual ends with a description of escape sequences
  3018. recognized when  Extended  emulation is selected from the
  3019.  Emulation Options  area of the  Preferences  requester.
  3020.  
  3021. In the following sections most control characters will be referred to
  3022. by their ASCII name. Therefore, a table of these control characters and
  3023. their numerical equivalents is appended.
  3024.  
  3025.    Sequences that change supermode  
  3026.  
  3027. When  Plain 4010/14  is selected from the  Emulation Options 
  3028. area of the  Preferences  requester, there are only three escape
  3029. sequences that can change the supermode. Two of them are:
  3030.  
  3031.  o CSI ?38h to enter the Graphic supermode, and
  3032.  o CSI ?38l to exit Graphic supermode to Alphanumeric supermode.
  3033.  
  3034. Here, the sequence  CSI  is a control sequence introducer, in this
  3035. case  ESC  [ .
  3036.  
  3037. The third escape sequence is  ESC   FF . This sequence is generally used
  3038. in Graphic supermode to erase the contents of the graphics window. When
  3039. this sequence is encountered in Alphanumeric supermode, the supermode
  3040. is changed to Graphic and the graphics window is cleared.
  3041.  
  3042. When  Extended  is selected from the  Emulation Options  area,
  3043. several additional control characters will change the supermode on
  3044. reception from the host. A list follows:
  3045.   
  3046.   CAN   Exit Graphic, enter Alphanumeric supermode. 
  3047.             (Only recognized in alpha mode). 
  3048.   FS    Enter Graphic supermode in point-plot mode. 
  3049.   GS    Enter Graphic supermode in vector mode. 
  3050.   RS    Enter Graphic supermode in incremental plot mode. 
  3051.   US    Enter Graphic supermode in alpha mode. 
  3052.  
  3053.   In addition, the sequence  ESC "0g causes exit to Alphanumeric
  3054. supermode, as well as the Tektronix 4105 sequence  ESC %!1.
  3055.   
  3056.  
  3057. For a description of each of the Graphic modes see  also Appendix II.
  3058.  
  3059.  
  3060.  
  3061.     Alpha mode 
  3062.  
  3063. Once the Graphics Emulator is in alpha mode it will print incoming
  3064. printable characters to the graphics window.  If the screen is
  3065. interlaced, a 74 column by 35 line format will be used.  If the screen
  3066. is not interlaced only 24 lines can be displayed.
  3067.  
  3068. The Emulator faithfully mimics the two-column mode of 4010/14 compatible
  3069. terminals:
  3070.  
  3071. when the bottom of the screen is reached, the left margin is changed to
  3072. the center of the screen and printout resumes at the top of the screen
  3073. obeying the new margin.  When a line extends beyond the virtual graphics
  3074. screen it is wrapped around to the next line.
  3075.  
  3076. In addition to the printable characters, the following control
  3077. characters and escape sequences are recognized.
  3078.   
  3079.   ESC             Introduce escape sequence. 
  3080.   ESC NUL         Same as  ESC . 
  3081.   ESC ESC         Same as  ESC . 
  3082.   ESC ENQ         Set bypass and return terminal
  3083.   BEL             Ring bell (flash screen). 
  3084.   ESC BEL         Ring bell (flash screen). 
  3085.   BS              Move one space left. 
  3086.   ESC BS          Move one space left. 
  3087.   HT              Move right to next tab stop. 
  3088.   ESC HT          Move right to next tab stop. 
  3089.   LF              Move one line down and return to left margin. 
  3090.   ESC LF          Same as  ESC . 
  3091.   CR              Move to left margin. 
  3092.   ESC CR          Same as  ESC . 
  3093.   VT              Move one line up. 
  3094.   ESC VT          Move one line up. 
  3095.   ESC FF          Erase and home. 
  3096.   ESC ETB         Make copy
  3097.   ESC CAN         Set bypass condition. 
  3098.   ESC SUB         Set GIN mode and bypass condition. 
  3099.   FS              Set point-plot mode. 
  3100.   ESC FS          Set point-plot mode. 
  3101.   GS              Set vector mode 
  3102.   ESC GS          Set vector mode
  3103.   RS              Set incremental plot mode. 
  3104.   ESC RS          Set incremental plot mode. 
  3105.   SP              Move one space right. 
  3106.   DEL             Same as  BS . 
  3107.   ESC DEL         Same as  ESC . 
  3108.   ESC  8          Select largest character size  
  3109.   ESC  9          Select large character size  
  3110.   ESC  :          Select small character size  
  3111.   ESC  ;          Select smallest charactersize  
  3112.   ESC  0          Same as  ESC  8  
  3113.   ESC  1          Same as  ESC  9  
  3114.   ESC  2          Same as  ESC  :  
  3115.   ESC  3          Same as  ESC  ;  
  3116.  
  3117.   
  3118.   Notes:
  3119.    1.   For a description of the report to the host see the section
  3120.             on reports to the host.
  3121.    2.   These sequences are not currently implemented.
  3122.    3.   After vector mode is entered, a move will be executed to
  3123.         the vector that follows.   All subsequent vectors will be drawn.
  3124.  
  3125.    Vector and point-plot (marker) mode 
  3126.  
  3127. In both vector and point-plot mode, the Graphics Emulator will interpret
  3128. incoming printable characters as  x,y  coordinates.  After entering vector
  3129. mode, the ``pen'' moves to the first vector encountered (the pen is ``up'').
  3130. All subsequent vector are drawn (with pen ``down'').
  3131.  
  3132. In the case of point-plot mode all vectors are marked with a dot.
  3133.  
  3134. Before discussing the encoding scheme of  x,y  pairs, it should be
  3135. noted that the Graphics Emulator works internally with a 4096  times 
  3136. 4096 pixel coordinate system as required for the Tektronix 4100 series
  3137. of graphics terminals. The following protocol for transfer of  x,y 
  3138. coordinates is, however, completely backwards compatible with the older
  3139. 4000 series with their internal coordinate system of 1024  times  1024
  3140. pixels: when the application running on the host assumes a 4000 series
  3141. terminal, the Graphics Emulator simply puts the lowest order two bits
  3142. of each coordinate to zero.
  3143.  
  3144. The encoding scheme of  x,y  pairs is syntactically described by:
  3145.   
  3146.   x,y = [ HiY ] [[ Extra ]  LoY  [ HiX ]] LoX  
  3147.   
  3148.   Each item enclosed in on the right hand side represents an ASCII character:
  3149.   
  3150.    HiY        Bit 0 through 4: most significant 5 bits ofy coordinate. 
  3151.               Bit 5 and 6: ``01'' (Tag bits). 
  3152.               Bit 7: parity. 
  3153.    Extra      Bit 0 and 1: least significant 2 bits of x coordinate. 
  3154.               Bit 2 and 3: least significant 2 bits of y coordinate. 
  3155.               Bit 4: unused. 
  3156.               Bit 5 and 6: ``11'' (Tag bits). 
  3157.               Bit 7: parity. 
  3158.    LoY        Bit 0 through 4: intermediate 5 bits of y coordinate. 
  3159.               Bit 5 and 6: ``11'' (Tag bits). 
  3160.               Bit 7: parity. 
  3161.    HiX        Bit 0 through 4: most significant 5 bits of x coordinate. 
  3162.               Bit 5 and 6: ``01'' (Tag bits). 
  3163.               Bit 7: parity. 
  3164.    LoX        Bit 0 through 4: intermediate 5 bits of x coordinate. 
  3165.               Bit 5 and 6: ``10'' (Tag bits). 
  3166.               Bit 7: parity. 
  3167.   
  3168.   In the syntactical expression above, an item enclosed in [ ]
  3169. may be omitted if it is the same as in the previous  x,y  sequence.
  3170. For example, an applications program running on the host assuming a
  3171. 4000 series terminal would send  HiY ,  LoY ,  HiX  and LoX  but not  Extra .
  3172. Notice, that  LoX  always needs to be sent. Notice also, that if either
  3173. Extra  or  HiX or both are sent,  LoY must  be sent.  To put it differently:
  3174. sending  HiY  is always optional.  LoY  can only be left out if neither
  3175. Extra  nor  HiX  are to be sent.  Again,  LoX  must always be sent.
  3176.  
  3177. In addition to these printable characters, the following control
  3178. characters and escape sequences are recognized.
  3179.   
  3180.   ESC             Introduce escape sequence. 
  3181.   ESC   NUL       Introduce escape sequence. 
  3182.   ESC   ENQ       Set bypass and return terminal
  3183.   BEL             Ring bell (flash screen). 
  3184.   ESC   LF        Introduce escape sequence. 
  3185.   CR              Set alpha mode and move to left margin  
  3186.   ESC   FF        Erase and home. 
  3187.   ESC   ETB       Make copy
  3188.   ESC   CAN       Set bypass condition. 
  3189.   ESC   SUB       Set GIN mode and bypass condition. 
  3190.   FS              Set point-plot mode. 
  3191.   ESC   FS        Set point-plot mode. 
  3192.   GS              Set vector mode 4
  3193.   ESC   GS        Set vector mode 4
  3194.   RS              Set incremental plot mode. 
  3195.   ESC   RS        Set incremental plot mode. 
  3196.   US              Set alpha mode. 
  3197.   ESC   US        Set alpha mode. 
  3198.   ESC   DEL       Introduce escape sequence. 
  3199.   ESC  `          Set normal vector, pattern: 1111111111111111 
  3200.   ESC  a          Set normal vector, pattern: 1010101010101010 
  3201.   ESC  b          Set normal vector, pattern: 1111101011111010 
  3202.   ESC  c          Set normal vector, pattern: 1110111011101110 
  3203.   ESC  d          Set normal vector, pattern: 1111110011111100 
  3204.   ESC  e          Set normal vector, pattern: 1111111101010101 
  3205.   ESC  f          Set normal vector, pattern: 1111111100111100 
  3206.   ESC  g          Set normal vector, pattern: 1111000011110000 
  3207.   ESC  h          Set  bold  vector, pattern: 1111111111111111 
  3208.   ESC  i          Set  bold  vector, pattern: 1010101010101010 
  3209.   ESC  j          Set  bold  vector, pattern: 1111101011111010 
  3210.   ESC  k          Set  bold  vector, pattern: 1110111011101110 
  3211.   ESC  l          Set  bold  vector, pattern: 1111110011111100 
  3212.   ESC  m          Set  bold  vector, pattern: 1111111101010101 
  3213.   ESC  n          Set  bold  vector, pattern: 1111111100111100 
  3214.   ESC  o          Set  bold  vector, pattern: 1111000011110000 
  3215.   ESC  ?          Low Y coordinate
  3216.  
  3217.   
  3218.   Notes:
  3219.    1.     For a description of the report to the host see the section
  3220.             on reports to the host.
  3221.    2.     In  Extended  emulation  CR  is ignored in vector/marker mode
  3222.             for compatibility with Tektronix 4100 series terminals.
  3223.    3.     This sequence is not currently implemented.
  3224.    4.     After vector mode is entered, a move will be executed to the
  3225.             vector that follows.  All subsequent vectors will be drawn.
  3226.    5.     This escape sequence is recognized in vector mode as a
  3227.             replacement for the  DEL  character that some hosts cannot send.
  3228.  
  3229.  
  3230.    Incremental Plot mode 
  3231.  
  3232. In incremental plot (marker) mode the following control and
  3233. escape sequences are recognized, as well as some printable characters.
  3234.   
  3235.   ESC             Introduce escape sequence. 
  3236.   ESC   NUL       Introduce escape sequence. 
  3237.   ESC   ENQ       Set bypass and return terminal
  3238.   ESC   BEL       Ring bell (flash screen). 
  3239.   ESC   LF        Introduce escape sequence. 
  3240.   CR              Set alpha mode and move to left  margin  
  3241.   ESC   CR        Introduce escape sequence. 
  3242.   ESC   FF        Enter alpha mode, erase and home. 
  3243.   ESC   ETB       Make copy (note 3) 
  3244.   ESC   CAN       Set bypass condition. 
  3245.   ESC   ESC       Introduce escape sequence. 
  3246.   ESC   SUB       Set GIN mode and bypass condition. 
  3247.   FS              Set point-plot mode. 
  3248.   ESC   FS        Set point-plot mode. 
  3249.   GS              Set vector mode 
  3250.   ESC   GS        Set vector mode 
  3251.   US              Set alpha mode. 
  3252.   ESC   US        Set alpha mode. 
  3253.   SP              Turn beam off (pen up). 
  3254.   P               Turn beam on (pen down). 
  3255.   D               Move up (north).
  3256.   E               Move up, right (northeast).
  3257.   A               Move right (east).
  3258.   I               Move down, right (southeast).
  3259.   H               Move down (south).
  3260.   J               Move down, left (southwest).
  3261.   B               Move left (west).
  3262.   F               Move up, left (northwest).
  3263.  
  3264.   
  3265.   Notes:
  3266.  
  3267.    1.   For a description of the report to the host see the section
  3268.             on reports to the host.
  3269.    2.   In  Extended  emulation  CR  is ignored in incremental mode
  3270.             for compatibility with Tektronix 4100 series terminals.
  3271.    3.   This sequence is not currently implemented.
  3272.    4.   After vector mode is entered, a move will be executed to the vector
  3273.             that follows.   All subsequent vectors will be drawn.
  3274.    5.   These commands move the pen one (Tektronix) pixel. The
  3275.             actual amount of movement depends therefore on whether a
  3276.             1024 times 1024 coordinate system is used or a 4096 times 4096
  3277.             one.   This is controlled by the gadgets in the Incremental Mode 
  3278.             area of the  Preferences  requester.
  3279.  
  3280.  
  3281.    GIN mode 
  3282.  
  3283. When the Graphics INput (GIN) mode is set, also the bypass condition is
  3284. entered.  This means that keyboard and mouse actions are handled
  3285. internally by the Graphics Emulator and usually sent on to the host in
  3286. a different form.  GIN mode (and bypass condition) can be exited
  3287. transparently to the host by selecting the  Off  sub-item of the
  3288. Graphic Cursor  menu option, but is usually terminated by a report
  3289. to the host.  A report to the host is sent when any alphanumeric
  3290. character is entered from the keyboard, or when the left mouse button
  3291. is pressed.  For a description of the report see the section on reports
  3292. to the host.
  3293.  
  3294. During any bypass condition, the following escape and control
  3295. sequences are recognized:
  3296.  
  3297.   ESC   ENQ       Set bypass and return terminal status
  3298.   BEL             Clear bypass and ring bell (flash screen). 
  3299.   ESC   BEL       Clear bypass and ring bell (flash screen). 
  3300.   LF              Clear bypass and cause new line. 
  3301.   ESC   LF        Clear bypass and introduce escape sequence. 
  3302.   CR              Clear bypass, move cursor to left margin and enter alpha mode
  3303.   ESC   CR        Clear bypass and introduce escape sequence. 
  3304.   ESC   FF        Clear bypass, enter alpha mode, erase and home. 
  3305.   ESC   ETB       Make copy  
  3306.   ESC   CAN       Set bypass condition. 
  3307.   ESC   SUB       Set GIN mode and bypass condition. 
  3308.   US              Clear bypass and set alpha mode. 
  3309.   ESC   US        Clear bypass and set alpha mode. 
  3310.  
  3311.   
  3312.   Notes:
  3313.     1.   For a description of the report to the host see the next
  3314.             section on reports to the host.
  3315.     2.   This sequence is not currently implemented.
  3316.  
  3317.    Reports to the host 
  3318.  
  3319. There are several ways in which the host can request a report from the
  3320. Graphics Emulator.  The details depend on the nature of the request and
  3321. on the current graphics mode.
  3322.  
  3323. While the terminal is in alpha mode,  ESC   ENQ  received from
  3324. the host causes automatic transmission of the terminal status byte, the
  3325. x,y  position of the lower left-hand corner of the alpha (block)
  3326. cursor, and the end-of-report sequence.
  3327.  
  3328. When the terminal is in vector, marker or incremental plot mode,
  3329. ESC   ENQ  causes transmission of the terminal status byte,
  3330. the current  x,y  position of the beam (pen) and the end-of-report
  3331. sequence.
  3332.  
  3333. During GIN mode,  ESC   ENQ  leads to transmission of the x,y  position
  3334. of the graphic cursor and the end-of-report sequence. The Graphics Emulator
  3335. exits GIN mode and returns to alpha mode.
  3336.  
  3337. Also during GIN mode, entering a character on the keyboard or pressing
  3338. the left mouse button causes transmission of the entered character (or
  3339. in case the mouse button was pressed, the currently selected character
  3340. for that case, see the User's Manual), the  x,y  position of the
  3341. graphic cursor and the end-of-report sequence.
  3342.  
  3343. In the default case, where the  Use 4010/14 Report  gadget is selected
  3344. from the  Preferences  requester, the report has the following appearence:
  3345.  
  3346.   Status      Bit 0: always ``1''. 
  3347.               Bit 1: ``0'' if left margin is at left, ``1'' if at center of
  3348.                      screen. 
  3349.               Bit 2 and 3:  ``00'': mode is point plot. 
  3350.                             ``01'': mode is alpha. 
  3351.                             ``10'': mode is vector. 
  3352.                             ``11'': mode is other. 
  3353.               Bit 7: parity. This byte is sent first. 
  3354.   HiX         Bit 0 through 4: most significant 5 bits of x coordinate. 
  3355.               Bit 5 and 6: ``01''. 
  3356.               Bit 7: parity. 
  3357.   LoX         Bit 0 through 4: least significant 5 bits of x coordinate. 
  3358.               Bit 5 and 6: ``01''. 
  3359.               Bit 7: parity. 
  3360.   HiY         Bit 0 through 4: most significant 5 bits of y coordinate. 
  3361.               Bit 5 and 6: ``01''. 
  3362.               Bit 7: parity. 
  3363.   LoY         Bit 0 through 4: least significant 5 bits of y coordinate. 
  3364.               Bit 5 and 6: ``01''. 
  3365.               Bit 7: parity. 
  3366.  
  3367.  End-of-report sequence. 
  3368.   
  3369.  
  3370. If the  Use Extended Report  gadget is selected from the Cursor Report
  3371. Options  area of the  Preferences  requester, the report appears as:
  3372.   
  3373.   Status      Same as above. 
  3374.   HiY         Bit 0 through 4: most significant 5 bits of y coordinate. 
  3375.               Bit 5 and 6: ``01''. 
  3376.               Bit 7: parity. 
  3377.   Extra       Bit 0 and 1: least significant 2 bits of x coordinate. 
  3378.               Bit 2 and 3: least significant 2 bits of y coordinate. 
  3379.               Bit 4: unused. 
  3380.               Bit 5 and 6: ``01''. 
  3381.               Bit 7: parity. 
  3382.   LoY         Bit 0 through 4: intermediate 5 bits of y coordinate. 
  3383.               Bit 5 and 6: ``01''. 
  3384.               Bit 7: parity. 
  3385.   HiX         Bit 0 through 4: most significant 5 bits of x coordinate. 
  3386.               Bit 5 and 6: ``01''. 
  3387.               Bit 7: parity. 
  3388.   LoX         Bit 0 through 4: intermediate 5 bits of x coordinate. 
  3389.               Bit 5 and 6: ``01''. 
  3390.               Bit 7: parity. 
  3391.  
  3392.  End-of-report sequence. 
  3393.   
  3394.  
  3395. In both cases, the end-of-report sequence is either non-existent or a
  3396. single  CR  or a  CR   EOT  sequence, depending on the currently selected
  3397. default (see also the User's Manual). 
  3398.  
  3399. In  Extended  emulation mode some other sequences are recognized
  3400. that cause a report to be sent to host (see next section).
  3401.  
  3402.    Extended emulation 
  3403.  
  3404. When  Extended  is selected from the  Emulation Options  area of
  3405. the  Preferences  requester, some control and escape sequences are
  3406. recognized that otherwise are not. The category of supermode-changing
  3407. control sequences was already discussed in section 1.
  3408.  
  3409. Additionally, the following escape sequences are recognized:
  3410.   
  3411.   ESC 0d     Draw light vectors with current attributes. 
  3412.   ESC 1d     Draw dark vectors (erasing previously drawn graphics). 
  3413.   ESC #!0    Request for report of current supermode. 
  3414.  
  3415. The report generated is a 6-character sequence: %!000 CR  if the current
  3416. supermode is Tektronix, %!001 CR  if the current supermode is Alphanumeric.
  3417.   
  3418. ESC IQTG Request for report of the current color map.  The report has the
  3419. following syntax:   TG number of surfaces  report-integer array 
  3420. CR , where  number of surfaces  is the report-integer 1, and  integer array
  3421. has the structure  color 0  surface number  color 1   color 2 ... color 7 . 
  3422. The  surface number  is the report-integer -1, and the  color n  are
  3423. three-report-integer sequences describing hue, lightness and saturation
  3424. of color n. The length of the array is therefore 25 (specified as the first
  3425. number in the array as described in section 7.3) A report-integer in
  3426. this context is always a three-character sequence which is different from a
  3427. regular Tektronix integer, see section 7.2.
  3428.   
  3429. ESC LT string  
  3430.  
  3431. Display the Tektronix 4100-series character string at the current position. 
  3432.  
  3433. A 4100-series character string starts with a Tektronix 4100-series integer
  3434. (explained below) indicating the length of the string followed by the
  3435. string itself as printable ASCII characters.
  3436.   
  3437. ESC ML index  Switch to color index.   index is a Tektronix 4100 series
  3438. style integer in the range 0 through 15 (section 7.1).
  3439.   
  3440. ESC MV pattern
  3441.  
  3442. Switch to pattern  pattern .  pattern  is a Tektronix 4100
  3443. series style integer. The patterns are as described in section 3, in 
  3444. the same sequence, n in the range 0 through 7.
  3445.   
  3446. ESC TG surface  colormap
  3447.  
  3448. Change the color values.   Hues, lightnesses and intensities of the new
  3449. colors  are specified in  colormap . The  surface  number has to be the
  3450. integer `1', and the  colormap  is a standard 4100-series array of integers
  3451. in the sequence  color-index ,  hue ,  lightness , saturation , next-
  3452. color-index   ... , as  explained below.
  3453.   
  3454. ESC WL0  Private sequence. 
  3455.  
  3456. When this sequence is sent, the emulator will open a new capture file.
  3457.  
  3458.   Tektronix 4100-series standard integers   
  3459.  
  3460. The encoding scheme of a standard Tektronix 4100-series integer
  3461. is syntactically described by:
  3462.   
  3463.   i  = [ HiI  [ HiI ]]  LoI  
  3464.   
  3465.   Each item enclosed in [ ]  on the right hand side represents an
  3466. ASCII character:
  3467.   
  3468.   HiI         Bit 0 through 5: most significant 6 bits of integer. 
  3469.               Bit 6: ``1'' (Tag bit). 
  3470.               Bit 7: parity. 
  3471.   LoI         Bit 0 through 3: least significant 4 bits of integer. 
  3472.               Bit 4: sign bit. When set, the integer is positive. 
  3473.               Bit 5 and 6: ``01'' (Tag bits). 
  3474.               Bit 7: parity. 
  3475.   
  3476.   In the syntactical expression above, an item enclosed in [ ]
  3477. may be omitted if the significant bits are 0. When two  HiI  values
  3478. are specified, the first one gives the bits 10 through 15 of the
  3479. resulting integer, the second one bits 4 through 9, and the  LoI 
  3480. value bits 0 through 3. If only one  HiI  value is specified, it
  3481. determines bits 4 through 9. If only a  LoI  value is specified,
  3482. the resulting integer takes the value specified in the bits 0 through
  3483. 3.  LoI  must always be sent, and its bit 4 determines the sign of
  3484. the integer.
  3485.  
  3486. Notice, that with this convention, the positive integers 0 through 9
  3487. happen to coincide with the ASCII characters `0' through `9'.
  3488.  
  3489.   Tektronix 4100-series report integers  
  3490.  
  3491. The encoding scheme of a Tektronix 4100-series report integer is
  3492. different from that of a standard integer and is syntactically described by:
  3493.   
  3494.   i  = [ HiI1 ] [ HiI2 ] [  LoI  ]
  3495.   
  3496.   Each item enclosed in []   on the right hand side represents an
  3497. ASCII character:
  3498.   
  3499.   HiI1        Most significant 6 bits of integer plus 32. 
  3500.               Bit 7: parity. 
  3501.   HiI2        Middle 6 bits of integer plus 32. 
  3502.               Bit 7: parity. 
  3503.   LoI         Least significant 4 bits of integer. 
  3504.               Bit 4: sign bit. When set, the integer is positive. 
  3505.               Bit 7: parity. 
  3506.   
  3507. Notice, that all three parts of the integer are always sent.
  3508.  
  3509. Notice also that decoding consists of subtracting 32 from the first two
  3510. characters, shifting the first by 6, adding the second, shifting the
  3511. result by 4, and adding the third after masking out the sign bit. If
  3512. the sign bit is set, the sign of the result is positive.
  3513.  
  3514.   Tektronix 4100 series integer arrays  
  3515.  
  3516. A Tektronix 4100 series array of integers is syntactically
  3517. described as:
  3518.   
  3519.   array  = number-of-elements  int  ...  int  
  3520.   
  3521. It is simply a list of N integers encoded as explained above,
  3522. preceded with the number N, also encoded as an integer.
  3523.  
  3524.  
  3525.    Table of ASCII control characters 
  3526.  
  3527. The following is a table of the first 33 ASCII characters.
  3528.   
  3529.  
  3530.  dec.  hex. oct.    name        ctrl  equivalent 
  3531.   
  3532.  
  3533.   
  3534.  0      0     0     NUL   ctrl  @ 
  3535.  1      1     1     SOH   ctrl  A 
  3536.  2      2     2     STX   ctrl  B 
  3537.  3      3     3     ETX   ctrl  C 
  3538.  4      4     4     EOT   ctrl  D 
  3539.  5      5     5     ENQ   ctrl  E 
  3540.  6      6     6     ACK   ctrl  F 
  3541.  7      7     7     BEL   ctrl  G 
  3542.  8      8     10    BS    ctrl  H 
  3543.  9      9     11    HT    ctrl  I 
  3544.  10     A     12    LF    ctrl  J 
  3545.  11     B     13    VT    ctrl  K 
  3546.  12     C     14    FF    ctrl  L 
  3547.  13     D     15    CR    ctrl  M 
  3548.  14     E     16    SO    ctrl  N 
  3549.  15     F     17    SI    ctrl  O 
  3550.  16     10    20    DLE   ctrl  P 
  3551.  17     11    21    DC1   ctrl  Q 
  3552.  18     12    22    DC2   ctrl  R 
  3553.  19     13    23    DC3   ctrl  S 
  3554.  20     14    24    DC4   ctrl  T 
  3555.  21     15    25    NAK   ctrl  U 
  3556.  22     16    26    SYN   ctrl  V 
  3557.  23     17    27    ETB   ctrl  W 
  3558.  24     18    30    CAN   ctrl  X 
  3559.  25     19    31    EM    ctrl  Y 
  3560.  26     1A    32    SUB   ctrl  Z 
  3561.  27     1B    33    ESC   ctrl  [ 
  3562.  28     1C    34    FS    ctrl  backslash 
  3563.  29     1D    35    GS    ctrl  ] 
  3564.  30     1E    36    RS    ctrl  ^ 
  3565.  31     1F    37    US    ctrl  _ 
  3566.  32     20    40    SP    space. 
  3567.